Exemple #1
0
 /**
  *
  */
 protected static function registerCoreSlots()
 {
     SignalSlotDispatcher::registerSlot(AbstractController::SIGNAL_INIT_RESPONSE, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'contentTypeHeader']);
     SignalSlotDispatcher::registerSlot(Dispatcher::SIGNAL_CONSTRUCT, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'invokeDatabaseMigrator']);
     SignalSlotDispatcher::registerSlot(Dispatcher::SIGNAL_OUTPUT_READY, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'writeOutputToCache']);
     SignalSlotDispatcher::registerSlot(Dispatcher::SIGNAL_OUTPUT_READY, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'addFrameworkSignatureToOutput']);
     SignalSlotDispatcher::registerSlot(Dispatcher::SIGNAL_OUTPUT_READY, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'echoOutput']);
     SignalSlotDispatcher::registerSlot(Dispatcher::SIGNAL_START_DISPATCHING, ['AppZap\\PHPFramework\\SignalSlot\\CoreSlots', 'readOutputFromCache']);
 }
Exemple #2
0
 /**
  * @param $uri
  * @return string
  */
 public function dispatch($uri)
 {
     $output = NULL;
     SignalSlotDispatcher::emitSignal(self::SIGNAL_START_DISPATCHING, $output, $uri, $this->requestMethod);
     if ($output === NULL) {
         $output = $this->dispatchUncached($uri);
     }
     SignalSlotDispatcher::emitSignal(self::SIGNAL_OUTPUT_READY, $output, $uri, $this->requestMethod);
     return $output;
 }
 /**
  * @param Request $request
  * @param AbstractView $response
  */
 public function __construct(Request $request, AbstractView $response)
 {
     /** @noinspection PhpDeprecationInspection */
     if ($this->require_http_authentication !== NULL) {
         /** @noinspection PhpDeprecationInspection */
         $this->requireHttpAuthentication = $this->require_http_authentication;
     }
     SignalSlotDispatcher::emitSignal(self::SIGNAL_INIT_REQUEST, $request);
     SignalSlotDispatcher::emitSignal(self::SIGNAL_INIT_RESPONSE, $response);
     $this->request = $request;
     $this->response = $response;
 }
 public function __construct()
 {
     SignalSlotDispatcher::registerSlot(Bootstrap::SIGNAL_PLUGINSLOADED, ['AppZap\\PHPFrameworkAirbrake\\ExceptionLogger', 'initialize']);
 }