Beispiel #1
0
 /**
  * ページ開始
  *
  * ページを実行します。
  *
  * @return void
  */
 protected function _run($pageClass)
 {
     if ($this->_config['enable_onshutdown'] === true) {
         register_shutdown_function(array($pageClass, 'onShutdown'));
     }
     $this->_sessionStart();
     // debugログ
     $this->_log->log('Page', $this->_config);
     // init/ページキャッシュ
     $initCache = $this->_runCache();
     // args取取
     $args = $this->_page->getArgs();
     // onClick
     $this->_runClick($args);
     // onInit
     if ($initCache === false) {
         $this->_log->log('onInit', $args);
         $this->_runInit($args);
         $this->_page->setPrototypeRo();
     } else {
         $this->_page->set($initCache);
     }
     // submit ?
     $hasSubmit = isset($_POST['_token']) || isset($_GET['_token']) ? true : false;
     if ($hasSubmit !== true) {
         // onOutput()
         $this->_runPreOnOutput();
         $this->_page->onOutput();
     } else {
         // onAction(OK) or onOutput()(NG)
         $this->_runSubmit();
     }
     $this->end($initCache);
 }
Beispiel #2
0
 /**
  * PageリソースをHTMLとして出力
  *
  * @param BEAR_Page &$page ページ
  *
  * @return BEAR_Ro
  */
 protected function _outputHtml(BEAR_Page &$page)
 {
     $page->setPrototypeRo();
     $page->onOutput();
     $ro = $page->getPageRo();
     return $ro;
 }