1 | <?php |
||
38 | class PageIndexerRequestHandler implements SingletonInterface |
||
39 | { |
||
40 | |||
41 | /** |
||
42 | * Index Queue page indexer request. |
||
43 | * |
||
44 | * @var PageIndexerRequest |
||
45 | */ |
||
46 | protected $request; |
||
47 | |||
48 | /** |
||
49 | * Index Queue page indexer response. |
||
50 | * |
||
51 | * @var PageIndexerResponse |
||
52 | */ |
||
53 | protected $response; |
||
54 | |||
55 | /** |
||
56 | * Index Queue page indexer frontend helper dispatcher. |
||
57 | * |
||
58 | * @var Dispatcher |
||
59 | */ |
||
60 | protected $dispatcher; |
||
61 | |||
62 | /** |
||
63 | * @var \ApacheSolrForTypo3\Solr\System\Logging\SolrLogManager |
||
64 | */ |
||
65 | protected $logger = null; |
||
66 | |||
67 | /** |
||
68 | * Constructor. |
||
69 | * |
||
70 | * Initializes request, response, and dispatcher. |
||
71 | */ |
||
72 | 1 | public function __construct() |
|
73 | { |
||
74 | 1 | $this->logger = GeneralUtility::makeInstance(SolrLogManager::class, __CLASS__); |
|
75 | 1 | $this->dispatcher = GeneralUtility::makeInstance(Dispatcher::class); |
|
76 | 1 | $this->request = GeneralUtility::makeInstance(PageIndexerRequest::class, $_SERVER['HTTP_X_TX_SOLR_IQ']); |
|
77 | 1 | $this->response = GeneralUtility::makeInstance(PageIndexerResponse::class); |
|
78 | 1 | $this->response->setRequestId($this->request->getRequestId()); |
|
79 | 1 | } |
|
80 | |||
81 | /** |
||
82 | * Authenticates the request, runs the frontend helpers defined by the |
||
83 | * request, and registers its own shutdown() method for execution at |
||
84 | * hook_eofe in tslib/class.tslib_fe.php. |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | public function run() |
||
110 | |||
111 | /** |
||
112 | * Completes the Index Queue page indexer request and returns the response |
||
113 | * with the collected results. |
||
114 | * |
||
115 | * @return void |
||
116 | */ |
||
117 | public function shutdown() |
||
130 | |||
131 | /** |
||
132 | * Gets the Index Queue page indexer request. |
||
133 | * |
||
134 | * @return PageIndexerRequest |
||
135 | */ |
||
136 | 1 | public function getRequest() |
|
137 | { |
||
138 | 1 | return $this->request; |
|
139 | } |
||
140 | |||
141 | /** |
||
142 | * Gets the Index Queue page indexer response. |
||
143 | * |
||
144 | * @return PageIndexerResponse |
||
145 | */ |
||
146 | public function getResponse() |
||
150 | } |
||
151 |