예제 #1
0
파일: FrameBase.php 프로젝트: aqg/crossphp
 /**
  * request response view
  *
  * @param string $property
  * @return Response|Request|View|Config|null
  */
 function __get($property)
 {
     switch ($property) {
         case 'config':
             return $this->config = $this->delegate->getConfig();
         case 'request':
             return $this->request = Request::getInstance();
         case 'response':
             return $this->response = Response::getInstance();
         case 'view':
             return $this->view = $this->initView();
     }
     return null;
 }
예제 #2
0
 /**
  * 实例化Application
  *
  * @param string $app_name
  * @param Delegate $delegate
  */
 function __construct($app_name, Delegate $delegate)
 {
     $this->app_name = $app_name;
     $this->delegate = $delegate;
     $this->config = $delegate->getConfig();
 }