| 1 | <?php |
||
| 16 | class DirectBindingQueryHandlerLocator implements QueryHandlerLocator |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var QueryHandler[] |
||
| 20 | */ |
||
| 21 | private $handlers = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Bind query handler to concrete query by class name. |
||
| 25 | * |
||
| 26 | * @param string $query_name |
||
| 27 | * @param QueryHandler $handler |
||
| 28 | */ |
||
| 29 | 2 | public function registerHandler($query_name, QueryHandler $handler) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param Query $query |
||
| 36 | * |
||
| 37 | * @return QueryHandler|null |
||
| 38 | */ |
||
| 39 | 2 | public function findHandler(Query $query) |
|
| 45 | } |
||
| 46 |