mailpoet
/
vendor-prefixed
/
doctrine
/
orm
/
src
/
Repository
/
Exception
/
InvalidMagicMethodCall.php
InvalidMagicMethodCall.php
18 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Repository\Exception; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Exception\ORMException; |
| 6 | use MailPoetVendor\Doctrine\ORM\Exception\RepositoryException; |
| 7 | final class InvalidMagicMethodCall extends ORMException implements RepositoryException |
| 8 | { |
| 9 | public static function becauseFieldNotFoundIn(string $entityName, string $fieldName, string $method) : self |
| 10 | { |
| 11 | return new self("Entity '" . $entityName . "' has no field '" . $fieldName . "'. " . "You can therefore not call '" . $method . "' on the entities' repository."); |
| 12 | } |
| 13 | public static function onMissingParameter(string $methodName) : self |
| 14 | { |
| 15 | return new self("You need to pass a parameter to '" . $methodName . "'"); |
| 16 | } |
| 17 | } |
| 18 |