public function __construct() { $this->_fc = frontController::getInstance(); $this->_options = $this->_fc->getParams(); $this->_viewObject = new indexView(); //TODO: получил значение getLanguage с FrontController-а, отдал конструктору модели для сортировки $this->_getLanguage = $this->_fc->getLanguage(); if (isset($_POST) && !empty($_POST)) { $this->_POST = $_POST; } else { $this->_POST = null; } $this->_modelObject = new indexModel($this->_getLanguage, $this->_options); }
public function __construct() { $this->_fc = frontController::getInstance(); $this->_getLanguag = $this->_fc->getLanguage(); }
<?php include "init.php"; include HEADER_INC_TEMPLATE_PATH; $front = frontController::getInstance(); $front->render(); include FOOTER_INC_TEMPLATE_PATH;
// // Préparer les scripts, css, entête // // =============================================================== $action = isset($_GET["action"]) ? $_GET["action"] : NULL; if ($action != "ajaxrequest") { $ua = getenv("HTTP_USER_AGENT"); if (strstr($ua, "MSIE 6.0")) { $style_specifique[] = "edt_organisation/lib/template/css/style_ie6"; $style_specifique[] = "templates/DefaultEDT/css/style_edt_ie6"; } else { if (strstr($ua, "MSIE 7")) { $style_specifique[] = "edt_organisation/lib/template/css/style_ie7"; } } $style_specifique[] = "edt_organisation/lib/template/css/style"; $style_specifique[] = "templates/DefaultEDT/css/style_edt"; $javascript_specifique[] = "edt_organisation/lib/template/js/script"; $utilisation_scriptaculous = 'ok'; $scriptaculous_effet = "effects,dragdrop"; require_once "../lib/header.inc.php"; // =============================================================== // // DEMARRER LE CONTROLLEUR // // =============================================================== $front = frontController::getInstance()->dispatch(); require "../lib/footer.inc.php"; } else { $front = frontController::getInstance()->dispatch(); }
<?php // load and initialize any global libraries require_once 'controllers/frontController.php'; frontController::getInstance()->run(); // route the request internally /*$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); if ('/framwork-demo/' == $uri) { list_action(); } elseif ('/framwork-demo/show' == $uri && isset($_GET['id'])) { show_action($_GET['id']); } else { header('Status: 404 Not Found'); echo '<html><body><h1>Page Not Found</h1></body></html>'; } var_dump($uri);*/