Exemple #1
0
 /**
  * 运行application
  * @param string $name
  * @param string $controller
  * @param string $action
  * @param array $parameters
  * @throws LogicException
  */
 protected function runApplication($name, $controller, $action, $parameters = [])
 {
     if (!isset($this->applications[$name])) {
         throw new LogicException("Application {$name} is not fund");
     }
     $this->application = $this->applications[$name];
     return $this->application->run($this, $controller, $action, $parameters);
 }
Exemple #2
0
 function __construct(ApplicationInterface $application)
 {
     $this->application = $application;
     $this->request = $application->getKernel()->getParameter('request');
     $this->response = new Response();
 }