Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 /**
  * @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;
 }
Ejemplo n.º 3
0
 /**
  *
  */
 protected static function loadPlugins()
 {
     $plugins = Configuration::getSection('phpframework', 'plugins');
     if ($plugins) {
         foreach ($plugins as $namespace => $enabled) {
             if ($enabled) {
                 $pluginLoaderClassname = $namespace . '\\PluginLoader';
                 if (!class_exists($pluginLoaderClassname)) {
                     throw new \Exception('Plugin ' . $namespace . ' could not be loaded. Class ' . $pluginLoaderClassname . ' was not found.', 1413322791);
                 }
                 new $pluginLoaderClassname();
             }
         }
     }
     SignalSlotDispatcher::emitSignal(self::SIGNAL_PLUGINSLOADED);
 }