Core_Read_Interface.php
2 weeks ago
Decorator.php
2 weeks ago
Filter_Validation.php
2 weeks ago
Formatter_Interface.php
2 weeks ago
Implementation_Error.php
2 weeks ago
Interface.php
2 weeks ago
Query_Filters.php
2 weeks ago
Read_Interface.php
2 weeks ago
Setter_Interface.php
2 weeks ago
Update_Interface.php
2 weeks ago
Usage_Error.php
2 weeks ago
Void_Query_Exception.php
2 weeks ago
Void_Query_Exception.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class Tribe__Repository__Void_Query_Exception |
| 5 | * |
| 6 | * Thrown to indicate that a query would yield no results in read, write, delete or update operations. |
| 7 | * |
| 8 | * Repository implementations should handle this exception gracefully as |
| 9 | * a signal, not an error. |
| 10 | * |
| 11 | * @since 4.7.19 |
| 12 | */ |
| 13 | class Tribe__Repository__Void_Query_Exception extends Exception { |
| 14 | |
| 15 | /** |
| 16 | * Indicates that query would yield no results. |
| 17 | * |
| 18 | * @since 4.7.19 |
| 19 | * |
| 20 | * @param string $reason |
| 21 | * |
| 22 | * @return Tribe__Repository__Void_Query_Exception |
| 23 | */ |
| 24 | public static function because_the_query_would_yield_no_results( $reason ) { |
| 25 | return new self( "The query would yield no results due to {$reason}, this exception should be handled" ); |
| 26 | } |
| 27 | } |
| 28 |