当前位置: 首页>>代码示例>>PHP>>正文


PHP Router::__construct方法代码示例

本文整理汇总了PHP中Router::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Router::__construct方法的具体用法?PHP Router::__construct怎么用?PHP Router::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Router的用法示例。


在下文中一共展示了Router::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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';
     }
 }
开发者ID:JessicaJAS,项目名称:pfc,代码行数:28,代码来源:index.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     self::loadPluginRoutes();
     if (Config::get("urlRewriting")) {
         self::addRewrites(CODE_ROOT_DIR . "config/rewrite.php");
     }
 }
开发者ID:reinfire,项目名称:arfooo,代码行数:8,代码来源:AppRouter.php

示例3: __construct

 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);
 }
开发者ID:noikiy,项目名称:lovetolove,代码行数:11,代码来源:Bootstrap.php

示例4: __construct

 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');
 }
开发者ID:nexgenta,项目名称:lens,代码行数:12,代码来源:cli.php

示例5: define

 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);
 }
开发者ID:WurdahMekanik,项目名称:hlf-ndxz,代码行数:12,代码来源:index.php

示例6: __construct

 public function __construct($host, $src, $dst, $mthd = null, $args = null)
 {
     parent::__construct($src, $dst, $mthd, $args);
     $this->host = $host;
 }
开发者ID:monkeytie,项目名称:korona,代码行数:5,代码来源:routerkorona.class.php

示例7: __construct

 /**
  * 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;
 }
开发者ID:rogeriopradoj,项目名称:joindin-api,代码行数:12,代码来源:VersionedRouter.php

示例8: __construct

 /**
  * @param \OCP\ICache $cache
  */
 public function __construct($cache)
 {
     $this->cache = $cache;
     parent::__construct();
 }
开发者ID:samj1912,项目名称:repo,代码行数:8,代码来源:cachingrouter.php

示例9: __construct

 /**
  * 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;
 }
开发者ID:asgrim,项目名称:joindin-api,代码行数:11,代码来源:ApiRouter.php

示例10: __construct

 /**
  * Automatically adds a configuration handler.
  */
 public function __construct()
 {
     parent::__construct();
     $this->handler(new Handlers\Configure());
     $this->initialize();
 }
开发者ID:bdusell,项目名称:jitsu-app,代码行数:9,代码来源:Application.php

示例11: __construct

 protected function __construct()
 {
     parent::__construct();
     $this->resolvePage();
 }
开发者ID:nsedenkov,项目名称:php_foolcms,代码行数:5,代码来源:Core.php

示例12:

 function __construct()
 {
     parent::__construct();
 }
开发者ID:WurdahMekanik,项目名称:hlf-ndxz,代码行数:4,代码来源:index.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_appConfig = Registry::get('main', 'config');
     $this->setType($this->_appConfig->get('frontend_router_type'));
 }
开发者ID:vgrish,项目名称:dvelum,代码行数:6,代码来源:Router.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->initialize();
 }
开发者ID:bdusell,项目名称:jitsu-app,代码行数:5,代码来源:SubRouter.php


注:本文中的Router::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。