Ejemplo n.º 1
0
 /**
  * Starts the execution of a frontend helper.
  *
  * @param Tx_Solr_IndexQueue_PageIndexerRequest $request Page indexer request
  * @param Tx_Solr_IndexQueue_PageIndexerResponse $response Page indexer response
  */
 public function processRequest(Tx_Solr_IndexQueue_PageIndexerRequest $request, Tx_Solr_IndexQueue_PageIndexerResponse $response)
 {
     $this->request = $request;
     $this->response = $response;
     if ($request->getParameter('loggingEnabled')) {
         GeneralUtility::devLog('Page indexer request received', 'solr', 0, array('request' => (array) $request));
     }
 }
Ejemplo n.º 2
0
 /**
  * Takes the request's actions and hands them of to the according frontend
  * helpers.
  *
  * @param	Tx_Solr_IndexQueue_PageIndexerRequest	$request The request to dispatch
  * @param	Tx_Solr_IndexQueue_PageIndexerResponse	$response The request's response
  */
 public function dispatch(Tx_Solr_IndexQueue_PageIndexerRequest $request, Tx_Solr_IndexQueue_PageIndexerResponse $response)
 {
     $actions = $request->getActions();
     foreach ($actions as $action) {
         $frontendHelper = $this->frontendHelperManager->resolveAction($action);
         $frontendHelper->activate();
         $frontendHelper->processRequest($request, $response);
     }
 }
 /**
  * Authenticates the request, runs the frontend helpers defined by the
  * request, and registers its own shutdown() method for execution at
  * hook_eofe in tslib/class.tslib_fe.php.
  *
  * @return	void
  */
 public function run()
 {
     if (!$this->request->isAuthenticated()) {
         t3lib_div::devLog('Invalid Index Queue Frontend Request detected!', 'solr', 3, array('page indexer request' => (array) $this->request, 'index queue header' => $_SERVER['HTTP_X_TX_SOLR_IQ']));
         die('Invalid Index Queue Request!');
     }
     $this->dispatcher->dispatch($this->request, $this->response);
     // register shutdown method here instead of in ext_localconf.php to
     // allow frontend helpers to execute at hook_eofe in
     // tslib/class.tslib_fe.php before shuting down
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'][__CLASS__] = '&Tx_Solr_IndexQueue_PageIndexerRequestHandler->shutdown';
 }