SQLParserUtilsException.php 750 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Doctrine\DBAL;
  3. use function sprintf;
  4. /**
  5. * Doctrine\DBAL\ConnectionException
  6. */
  7. class SQLParserUtilsException extends DBALException
  8. {
  9. /**
  10. * @param string $paramName
  11. *
  12. * @return \Doctrine\DBAL\SQLParserUtilsException
  13. */
  14. public static function missingParam($paramName)
  15. {
  16. return new self(sprintf('Value for :%1$s not found in params array. Params array key should be "%1$s"', $paramName));
  17. }
  18. /**
  19. * @param string $typeName
  20. *
  21. * @return \Doctrine\DBAL\SQLParserUtilsException
  22. */
  23. public static function missingType($typeName)
  24. {
  25. return new self(sprintf('Value for :%1$s not found in types array. Types array key should be "%1$s"', $typeName));
  26. }
  27. }