Esempio n. 1
1
 /**
  * Overriding parent
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     // View
     if ($name == 'view') {
         return $this->_controllerInstance->getView();
     }
     // Request
     if ($name == 'request') {
         return $this->_controllerInstance->getRequest();
     }
     // Response
     if ($name == 'response') {
         return $this->_controllerInstance->getResponse();
     }
     // POST
     if ($name == 'post') {
         return $this->_controllerInstance->getRequest()->getPost();
     }
     // GET
     if ($name == 'query') {
         return $this->_controllerInstance->getRequest()->getQuery();
     }
     // URL parameters
     if ($name == 'params') {
         return $this->_controllerInstance->getRequest()->getParams();
     }
     // application env
     if ($name == 'appEnv') {
         return $this->_controllerInstance->getAppEnv();
     }
     parent::__get($name);
 }
Esempio n. 2
0
 function __construct()
 {
     parent::getModel("intranetProduct");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getAllArticlesOrderedByName();
     parent::getView("intranetProduct", $this->tabl);
 }
Esempio n. 3
0
 function __construct()
 {
     parent::getModel("intranetHome");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getMissingArticles();
     parent::getView("intranetHome", $this->tabl);
 }
Esempio n. 4
0
 function __construct()
 {
     parent::getModel("intranetAddNew");
     $tabl = array();
     $this->tabl['id'] = $this->modelInstance->newArticle();
     parent::getView("intranetAddNew", $this->tabl);
 }
Esempio n. 5
0
 function __construct()
 {
     parent::getModel("intranetAddModify");
     $tabl = array();
     $this->id = $_GET['id'];
     $this->tabl['id'] = $this->modelInstance->getArticleById($this->id);
     parent::getView("intranetAddModify", $this->tabl);
 }
Esempio n. 6
0
 function __construct()
 {
     parent::getModel("shopHome");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getArticle();
     $this->tabl['img'] = $this->tabl['article01'][0]['IMAGE'];
     parent::getView("shopHome", $this->tabl);
 }
Esempio n. 7
0
 public function testSetNoRender()
 {
     $v = new View();
     $v->setViewPath(__DIR__ . '/views');
     $this->object->setView($v);
     $this->object->value = "hello";
     $this->assertSame($v, $this->object->getView());
     $this->object->setNoRender();
     $this->assertNotSame($v, $this->object->getView());
 }
Esempio n. 8
0
 /**
  * Constructor
  */
 function __construct()
 {
     // Merge GET and POST params
     $oRequest = new Request(array_merge($_GET, $_POST));
     // Create main view
     $this->oMainView = new View('gabarit');
     $this->oMainView->addData('title', Config::get('sitetitle'));
     try {
         // Create associated controller
         $this->createController($oRequest);
         // Execute controller
         $this->oController->procede();
         $this->oMainView->addData('menuItems', $this->createMenu());
         $this->oMainView->addData('login', $this->oController->getCurrentUser()->getLogin());
         $this->oMainView->addData('body', $this->oController->getView());
         $this->oMainView->addData('script', $this->oController->getJS());
     } catch (Error $e) {
         $this->oMainView->addAlert($e, 'danger');
     } finally {
         // Create the main view
         $this->oMainView->create();
     }
 }
Esempio n. 9
0
 function __construct()
 {
     parent::getModel("intranetAdd");
     $tabl = array();
     parent::getView("intranetAdd", $tabl);
 }
Esempio n. 10
0
    private function completed()
    {
        global $phpEx;
        if ($_GET['from'] == "posting") {
            $url = "posting." . $phpEx . "?mode=" . $_GET['mode'] . "&";
            if ($_GET['mode'] == "newtopic") {
                $url .= "f=" . urlencode($_GET['f']);
            } else {
                if ($_GET['mode'] == "reply") {
                    $url .= "t=" . urlencode($_GET['t']);
                } else {
                    $url .= "p=" . urlencode($_GET['p']);
                }
            }
            header("Location: " . append_sid($url));
        }
    }
    public function getView()
    {
        return $this->view;
    }
}
$controller = new Controller();
$controller->start();
$view = $controller->getView();
if ($view) {
    $page_title = 'Quiz';
    require_once $phpbb_root_path . 'includes/page_header.' . $phpEx;
    $view->display();
    require_once $phpbb_root_path . 'includes/page_tail.' . $phpEx;
}
Esempio n. 11
0
 /**
  * Gets the body of the website, generated through the view.
  * @return string
  */
 public function getBody()
 {
     return $this->controller->getView($this->view)->getContents();
 }
Esempio n. 12
0
 function __construct()
 {
     parent::getModel("Default");
     $this->d = @$_POST['user'] ? $_POST['user'] : "";
     parent::getView("Default", $this->d);
 }