Exemple #1
0
 public function __construct(\core\Request $request)
 {
     $this->_controller = $request->getController();
     $this->_view = $request->getAction();
     $objeto = new \core\Config(FILE_CONFIG_APP);
     $this->_config = $objeto->getConfig();
 }
Exemple #2
0
 public function __construct()
 {
     $configFile = new \core\Config(FILE_CONFIG_APP);
     $configuration = $configFile->getConfig();
     $request = new \core\Request();
     $this->_view = new \core\View($request);
     $this->_view->title = ucwords($request->getAction());
 }
Exemple #3
0
 /**
  * Objeto que representa la peticion.
  * 
  */
 public function __construct()
 {
     try {
         $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL);
         $url = explode('/', $url);
         $url = array_filter($url);
         $this->_controller = strtolower(array_shift($url));
         $this->_action = strtolower(array_shift($url));
         $this->_parameters = $url;
         $config = new \core\Config(FILE_CONFIG_APP);
         $ini = $config->getConfig();
         if (!$this->_controller) {
             $this->_controller = $ini['application']['controllerDefault'];
         }
         if (!$this->_action) {
             $this->_action = $ini['application']['actionDefault'];
         }
         if (!isset($this->_parameters)) {
             $this->_parameters = array();
         }
     } catch (Exception $ex) {
         throw $ex;
     }
 }