Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->rout = '';
     $this->explodeUri();
     /*
     apenas para checagem dos caminhos
     //echo '<p>ROUT FILE: '.$routFile.'</p>';
     echo '<pre >';
     echo '<p>ROTA COMPLETA: '.$this->getRoute().'</p>';
     echo '<p>NOME Controller: '.$this->getController().'</p>';
     echo '<p>NOME METODO: '.$this->getAction().'</p>';
     echo '</pre>';
     */
     if ($this->load->controller($this->getRoute() . $this->getController())) {
         $_controller = $this->getController();
         $action = $this->getAction();
         if (method_exists($this->{$_controller}, $action)) {
             $this->{$_controller}->{$action}();
         } else {
             $_message_error = "<p><strong>DESCULPE-NOS</strong></p>\n\t\t\t\t\t\t\t\t<p>A página que você procura não foi encontrada.</p>\n\t\t\t\t\t\t\t\t<p>Verifique o endereço digitado ou tente novamente mais tarde.</p>\n\t\t\t\t\t\t\t\t";
             require_once BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . ERRORDIR . DIRECTORY_SEPARATOR . 'error_404.php';
         }
     } else {
         $_message_error = "<p><strong>DESCULPE-NOS</strong></p>\n\t\t\t\t\t\t\t\t<p>A página que você procura não foi encontrada.</p>\n\t\t\t\t\t\t\t\t<p>Verifique o endereço digitado ou tente novamente mais tarde.</p>";
         require_once BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . ERRORDIR . DIRECTORY_SEPARATOR . 'error_404.php';
     }
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     self::loadPluginRoutes();
     if (Config::get("urlRewriting")) {
         self::addRewrites(CODE_ROOT_DIR . "config/rewrite.php");
     }
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     require_once 'define.php';
     Session::init();
     define('CONTROLLER_PATH', APP_PATH . Router::$dir . DS . 'controller' . DS);
     define('VIEWS_PATH', APP_PATH . Router::$dir . DS . 'views' . DS);
     define('INCLUDE_PATH', APP_PATH . Router::$dir . DS . 'include' . DS);
     define('LAYOUT_PATH', VIEWS_PATH . 'layout' . DS);
     define('WIDGET_PATH', VIEWS_PATH . 'widget' . DS);
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->sapi['cli']['__DEFAULT__'] = array('file' => PLATFORM_PATH . 'cli.php', 'class' => 'CliHelp');
     $this->sapi['cli']['indexer'] = array('class' => 'LensIndexer', 'description' => 'Launch the continual indexing process');
     $this->sapi['cli']['create'] = array('class' => 'LensCreate', 'description' => 'Create a new event sink');
     $this->sapi['cli']['event'] = array('class' => 'LensEvent', 'description' => 'Log a new event to a sink');
     $this->sapi['cli']['add-index'] = array('class' => 'LensAddIndex', 'description' => 'Create a new index on a sink');
     $this->sapi['cli']['reindex'] = array('class' => 'LensReindex', 'description' => 'Re-index events in a sink');
     $this->sapi['cli']['add-group'] = array('class' => 'LensAddGroup', 'description' => 'Create a new aggregate on a sink');
     $this->sapi['cli']['sinks'] = array('class' => 'LensListSinks', 'description' => 'List available event sinks');
 }
Example #5
0
 function __construct()
 {
     parent::__construct();
     // which object are we accessing?
     define('OBJECT', 'exhibit');
     $find['obj_ref_type'] = OBJECT;
     $this->object = $this->db->selectArray('object_meta', $find, Db::FETCH_RECORD);
     // library of $_POST options
     $submits = array('upd_view', 'img_upload', 'publish_x', 'add_page', 'delete_x', 'publish_page', 'upd_ord', 'upd_img_ord', 'upd_section', 'upd_cbox', 'upd_settings', 'upd_delete', 'unpublish_x', 'del_bg_img', 'bg_img_upload', 'upd_jxs', 'upd_jximg', 'upd_jxdelimg', 'upd_jxtext', 'add_sec', 'del_sec', 'edit_sec');
     // from $_POST to method
     $this->posted($this, $submits);
 }
Example #6
0
 public function __construct($host, $src, $dst, $mthd = null, $args = null)
 {
     parent::__construct($src, $dst, $mthd, $args);
     $this->host = $host;
 }
 /**
  * Constructs a new V2_1Router
  * 
  * @param array $config
  * @param array $rules
  */
 public function __construct($version, array $config, array $rules = array())
 {
     parent::__construct($config);
     $this->version = $version;
     $this->rules = $rules;
 }
Example #8
0
 /**
  * @param \OCP\ICache $cache
  */
 public function __construct($cache)
 {
     $this->cache = $cache;
     parent::__construct();
 }
Example #9
0
 /**
  * Constructs a new Router
  *
  * @param array $config The application configuration
  */
 public function __construct(array $config, array $routers, array $oldVersions)
 {
     parent::__construct($config);
     $this->setRouters($routers);
     $this->oldVersions = $oldVersions;
 }
Example #10
0
 /**
  * Automatically adds a configuration handler.
  */
 public function __construct()
 {
     parent::__construct();
     $this->handler(new Handlers\Configure());
     $this->initialize();
 }
Example #11
0
 protected function __construct()
 {
     parent::__construct();
     $this->resolvePage();
 }
Example #12
0
 function __construct()
 {
     parent::__construct();
 }
Example #13
0
 public function __construct()
 {
     parent::__construct();
     $this->_appConfig = Registry::get('main', 'config');
     $this->setType($this->_appConfig->get('frontend_router_type'));
 }
Example #14
0
 public function __construct()
 {
     parent::__construct();
     $this->initialize();
 }