OutOfBoundsException.php 641 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Doctrine\Common\Proxy\Exception;
  3. use OutOfBoundsException as BaseOutOfBoundsException;
  4. use function sprintf;
  5. /**
  6. * Proxy Invalid Argument Exception.
  7. *
  8. * @link www.doctrine-project.org
  9. */
  10. class OutOfBoundsException extends BaseOutOfBoundsException implements ProxyException
  11. {
  12. /**
  13. * @param string $className
  14. * @param string $idField
  15. *
  16. * @return self
  17. *
  18. * @psalm-param class-string $className
  19. */
  20. public static function missingPrimaryKeyValue($className, $idField)
  21. {
  22. return new self(sprintf('Missing value for primary key %s on %s', $idField, $className));
  23. }
  24. }