| 1 | <?php |
||
| 20 | class InvalidClass extends InvalidArgumentException implements Exception { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Return new instance of this exception when a class does not implement the necessary interface. |
||
| 24 | * |
||
| 25 | * @since %VERSION% |
||
| 26 | * |
||
| 27 | * @param string $class The invalid class name. |
||
| 28 | * @param string $interface The interface that the class should implement. |
||
| 29 | * |
||
| 30 | * @return static |
||
| 31 | */ |
||
| 32 | public static function from_interface( $class, $interface ) { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Return a new instance of this exception when a class is not found. |
||
| 42 | * |
||
| 43 | * @since %VERSION% |
||
| 44 | * |
||
| 45 | * @param string $class The invalid class name. |
||
| 46 | * |
||
| 47 | * @return static |
||
| 48 | */ |
||
| 49 | public static function not_found( $class ) { |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Return a new instance of this exception when we expected one class but got another. |
||
| 58 | * |
||
| 59 | * @since %VERSION% |
||
| 60 | * |
||
| 61 | * @param string $class The class name we received. |
||
| 62 | * @param string $expected The Class name we expected. |
||
| 63 | * |
||
| 64 | * @return static |
||
| 65 | */ |
||
| 66 | public static function mismatch( $class, $expected ) { |
||
| 73 | } |
||
| 74 |