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


PHP Router::getPaths方法代码示例

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


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

示例1: __construct

 function __construct($method, $messages)
 {
     $this->controller = new AppController();
     $params = Router::getParams();
     $viewPath = $this->controller->viewPath;
     if (Configure::read('App.theme')) {
         $viewPath = 'errors';
         if ($this->controller->view == 'Theme') {
             $viewPath = 'themed' . DS . Configure::read('App.theme') . DS . 'errors';
         }
     }
     if (Configure::read('debug') == 0) {
         $method = 'error404';
     }
     $checkView = VIEWS . $viewPath . DS . Inflector::underscore($method) . '.ctp';
     if (file_exists($checkView)) {
         $this->controller->_set(Router::getPaths());
         $this->controller->viewPath = $viewPath;
         $this->controller->theme = $appConfigurations['theme'];
         $this->controller->pageTitle = __('Error', true);
         $this->controller->set('message', $messages[0]['url']);
         $this->controller->set('appConfigurations', $appConfigurations);
         $this->controller->render($method);
         e($this->controller->output);
     } else {
         parent::__construct($method, $messages);
     }
 }
开发者ID:nicoeche,项目名称:Finalus,代码行数:28,代码来源:app_error.php

示例2: __construct

	/**
	 * __construct
	 *
	 * @access public
	 * @return void
	 */
	function __construct() {
		parent::__construct();
		$this->_set(Router::getPaths());
		$this->params = Router::getParams();
		$this->constructClasses();
		$this->Component->initialize($this);
		$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
	}
开发者ID:ralmeida,项目名称:FoundFree.org,代码行数:14,代码来源:error.php

示例3: __construct

 /**
  * __construct
  *
  * @access public
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     $this->_set(Router::getPaths());
     $this->request = Router::getRequest(false);
     $this->constructClasses();
     $this->Components->trigger('initialize', array(&$this));
     $this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
 }
开发者ID:no2key,项目名称:Web-Framework-Benchmark,代码行数:15,代码来源:cake_error_controller.php

示例4: __construct

 public function __construct($request = null, $response = null)
 {
     parent::__construct($request, $response);
     if ($this->name == 'CakeError') {
         $this->_set(Router::getPaths());
         $this->request->params = Router::getParams();
         $this->constructClasses();
         $this->startupProcess();
     }
 }
开发者ID:hotanlam,项目名称:japansource,代码行数:10,代码来源:AppController.php

示例5: __construct

 /**
  * Constructor
  *
  * @access public
  */
 public function __construct()
 {
     Croogo::applyHookProperties('Hook.controller_properties');
     parent::__construct();
     if ($this->name == 'CakeError') {
         $this->_set(Router::getPaths());
         $this->params = Router::getParams();
         $this->constructClasses();
         $this->Component->initialize($this);
         $this->beforeFilter();
         $this->Component->triggerCallback('startup', $this);
     }
 }
开发者ID:Tamsmiranda,项目名称:croogo,代码行数:18,代码来源:app_controller.php

示例6: __construct

 /**
  * 
  */
 function __construct($method, $messages)
 {
     $params = Router::getParams();
     if (($method == 'missingController' || $method == 'missingAction') && file_exists(VIEWS . DS . 'static' . DS . $params['controller'] . ".ctp")) {
         $this->controller =& new AppController();
         $this->controller->_set(Router::getPaths());
         $this->controller->params = $params;
         $this->controller->constructClasses();
         $this->controller->beforeFilter();
         $this->controller->viewPath = 'static';
         $this->controller->render($params['controller']);
         e($this->controller->output);
         exit;
     }
     parent::__construct($method, $messages);
     exit;
 }
开发者ID:yamaguchitarou,项目名称:bakesale,代码行数:20,代码来源:app_error.php

示例7: normalize

 /**
  * Normalizes a URL for purposes of comparison.  Will strip the base path off
  * and replace any double /'s.  It will not unify the casing and underscoring
  * of the input value.
  *
  * @param mixed $url URL to normalize Either an array or a string url.
  * @return string Normalized URL
  * @access public
  * @static
  */
 function normalize($url = '/')
 {
     if (is_array($url)) {
         $url = Router::url($url);
     } elseif (preg_match('/^[a-z\\-]+:\\/\\//', $url)) {
         return $url;
     }
     $paths = Router::getPaths();
     if (!empty($paths['base']) && stristr($url, $paths['base'])) {
         $url = preg_replace('/^' . preg_quote($paths['base'], '/') . '/', '', $url, 1);
     }
     $url = '/' . $url;
     while (strpos($url, '//') !== false) {
         $url = str_replace('//', '/', $url);
     }
     $url = preg_replace('/(?:(\\/$))/', '', $url);
     if (empty($url)) {
         return '/';
     }
     return $url;
 }
开发者ID:asairoha,项目名称:pj01,代码行数:31,代码来源:router.php

示例8: normalize

 /**
  * Normalizes a URL for purposes of comparison
  *
  * @param mixed $url URL to normalize
  * @return string Normalized URL
  * @access public
  */
 function normalize($url = '/')
 {
     if (is_array($url)) {
         $url = Router::url($url);
     }
     $paths = Router::getPaths();
     if (!empty($paths['base']) && stristr($url, $paths['base'])) {
         $url = str_replace($paths['base'], '', $url);
     }
     $url = '/' . $url;
     while (strpos($url, '//') !== false) {
         $url = str_replace('//', '/', $url);
     }
     $url = preg_replace('/(\\/$)/', '', $url);
     if (empty($url)) {
         return '/';
     }
     return $url;
 }
开发者ID:BLisa90,项目名称:cakecart,代码行数:26,代码来源:router.php

示例9: _normalizeURL

 /**
  * Normalizes a URL
  *
  * @param string $url URL to normalize
  * @return string Normalized URL
  * @access protected
  */
 function _normalizeURL($url = '/')
 {
     if (is_array($url)) {
         $url = Router::url($url);
     }
     $paths = Router::getPaths();
     if (!empty($paths['base']) && stristr($url, $paths['base'])) {
         $url = r($paths['base'], '', $url);
     }
     $url = '/' . $url . '/';
     while (strpos($url, '//') !== false) {
         $url = r('//', '/', $url);
     }
     return $url;
 }
开发者ID:rhencke,项目名称:mozilla-cvs-history,代码行数:22,代码来源:auth.php

示例10: missingModel

 /**
  * Renders the Missing Model class web page.
  *
  * @param unknown_type $params Parameters for controller
  * @access public
  */
 function missingModel($params)
 {
     extract(Router::getPaths());
     extract($params, EXTR_OVERWRITE);
     $this->controller->base = $base;
     $this->controller->viewPath = 'errors';
     $this->controller->webroot = $this->_webroot();
     $this->controller->set(array('model' => $className, 'title' => __('Missing Model', true)));
     $this->controller->render('missingModel');
     exit;
 }
开发者ID:kaz0636,项目名称:openflp,代码行数:17,代码来源:error.php

示例11: urlProjectFull

 /**
  * Captura a URL do projeto
  * - protocol://project_server/project_name
  * - http://192.168.56.101/project_name/
  * - http://localhost/project_name/
  *
  * @return string url
  */
 public static function urlProjectFull()
 {
     $urlServer = Router::fullBaseUrl();
     $projectServerPath = Router::getPaths();
     return $urlServer . $projectServerPath['base'];
 }
开发者ID:ribaslucian,项目名称:php-cakephp-2.x-base,代码行数:14,代码来源:SupportComponent.php


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