1 | <?php |
||
15 | abstract class ActionSearchAbstract extends MiddlewareAbstract |
||
16 | { |
||
17 | const DEFAULT_CURSOR = 1; |
||
18 | |||
19 | /** |
||
20 | * @var ResourceDOInterface|ResourceDO |
||
21 | */ |
||
22 | protected $resourceDO; |
||
23 | |||
24 | /** |
||
25 | * Search provider |
||
26 | * @var mixed |
||
27 | */ |
||
28 | protected $searcher; |
||
29 | |||
30 | /** |
||
31 | * @var UserInterface|User |
||
32 | */ |
||
33 | protected $user; |
||
34 | |||
35 | public function __construct( |
||
45 | |||
46 | /** |
||
47 | * @param ServerRequestInterface $request |
||
48 | * @param ResponseInterface $response |
||
49 | * @param callable|null $next |
||
50 | * @return EmptyResponse |
||
51 | * @throws \Exception |
||
52 | */ |
||
53 | public function __invoke( |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | abstract protected function search(); |
||
69 | |||
70 | abstract protected function getQuery(); |
||
71 | |||
72 | protected function action() |
||
78 | |||
79 | /** |
||
80 | * @return int |
||
81 | */ |
||
82 | protected function getCursor() |
||
93 | } |