Example #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);
 }
Example #2
0
 function __construct()
 {
     parent::getModel("intranetProduct");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getAllArticlesOrderedByName();
     parent::getView("intranetProduct", $this->tabl);
 }
Example #3
0
 function __construct()
 {
     parent::getModel("intranetHome");
     $tabl = array();
     $this->tabl['article01'] = $this->modelInstance->getMissingArticles();
     parent::getView("intranetHome", $this->tabl);
 }
Example #4
0
 function __construct()
 {
     parent::getModel("intranetAddNew");
     $tabl = array();
     $this->tabl['id'] = $this->modelInstance->newArticle();
     parent::getView("intranetAddNew", $this->tabl);
 }
Example #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);
 }
Example #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);
 }
Example #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());
 }
Example #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();
     }
 }
Example #9
0
 function __construct()
 {
     parent::getModel("intranetAdd");
     $tabl = array();
     parent::getView("intranetAdd", $tabl);
 }
Example #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;
}
Example #11
0
 /**
  * Gets the body of the website, generated through the view.
  * @return string
  */
 public function getBody()
 {
     return $this->controller->getView($this->view)->getContents();
 }
Example #12
0
 function __construct()
 {
     parent::getModel("Default");
     $this->d = @$_POST['user'] ? $_POST['user'] : "";
     parent::getView("Default", $this->d);
 }