Пример #1
0
 /**
  * Set the response's content.
  * @param ResponseContent $page The response's content.
  */
 public function setContent(ResponseContent $content)
 {
     $this->content = $content;
     if ($content instanceof RawResponse) {
         $content->emitter()->on('output', array($this, 'output'));
     }
 }
 /**
  * Initialize the back controller.
  * @param Application $app    The application.
  * @param string      $module The module.
  * @param string      $action The action.
  */
 public function __construct(Application $app, $module, $action)
 {
     parent::__construct($app);
     $this->setModule($module);
     $this->setAction($action);
     $daos = new Daos();
     $this->managers = new Managers($daos);
     $this->config = new ModuleConfig($app, $module);
     $this->translation = new ModuleTranslation($app, $module, $action);
     $this->responseContent = new Page($app, $module, $action);
     $this->responseContent->setTranslation($this->translation);
 }
 /**
  * Send the response.
  */
 public function send()
 {
     exit($this->content->generate());
 }