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


PHP Zend_Controller_Router_Route::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Prepares the route for mapping by splitting (exploding) it
  * to a corresponding atomic parts. These parts are assigned
  * a position which is later used for matching and preparing values.
  *
  * @param Zend_Controller_Front $front Front Controller object
  * @param string $route Map used to match with later submitted URL path
  * @param array $defaults Defaults for map variables with keys as variable names
  * @param array $reqs Regular expression requirements for variables (keys as variable names)
  * @param Zend_Translate $translator Translator to use for this instance
  */
 public function __construct(Zend_Controller_Front $front, $route, $defaults = array(), $reqs = array(), Zend_Translate $translator = null, $locale = null)
 {
     $this->_front = $front;
     $this->_dispatcher = $front->getDispatcher();
     $this->_route = $route;
     parent::__construct($route, $defaults, $reqs, $translator, $locale);
 }
开发者ID:vrtulka23,项目名称:daiquiri,代码行数:18,代码来源:Rest.php

示例2: __construct

 public function __construct($route, $defaults = array(), $reqs = array())
 {
     if (preg_match('/\\.\\w*$/', $route, $matches)) {
         $this->_defaultRepresentation = trim($matches[0], '.');
         $route = preg_replace('/(\\.\\w*)?$/', '', $route);
     }
     parent::__construct($route, $defaults, $reqs);
 }
开发者ID:sitengine,项目名称:sitengine,代码行数:8,代码来源:Route.php

示例3: __construct

 public function __construct()
 {
     /* Informações */
     $route = $this->getRoute();
     $defaults = $this->getDefaults();
     /* Construtor */
     parent::__construct($route, $defaults);
 }
开发者ID:laiello,项目名称:wanderson,代码行数:8,代码来源:Auth.php

示例4: __construct

 /**
  * Prepares the route for mapping by splitting (exploding) it
  * to a corresponding atomic parts. These parts are assigned
  * a position which is later used for matching and preparing values.
  *
  * @param string         $route      Map used to match with later submitted URL path
  * @param array          $defaults   Defaults for map variables with keys as variable names
  * @param array          $reqs       Regular expression requirements for variables (keys as variable names)
  * @param string         $tokenVar   Variable name for token
  * @param Zend_Translate $translator Translator to use for this instance
  */
 public function __construct($route, $defaults = array(), $reqs = array(), $tokenVar = 'token', Zend_Translate $translator = null, $locale = null)
 {
     parent::__construct($route, $defaults, $reqs, $translator, $locale);
     $this->_defaults['module'] = 'download';
     if (isset($this->_defaults['token'])) {
         throw new \Zend_Controller_Router_Exception("Route cannot have a default token.");
     }
     if (!in_array($this->_tokenVariable, $this->_variables)) {
         throw new \Zend_Controller_Router_Exception("Route must have a token variable inside route.");
     }
 }
开发者ID:SandeepUmredkar,项目名称:PortalSMIP,代码行数:22,代码来源:OneUse.php

示例5: __construct

 /**
  * Prepares the route for mapping by splitting (exploding) it
  * to a corresponding atomic parts. These parts are assigned
  * a position which is later used for matching and preparing values.
  *
  * @param string $route Map used to match with later submitted URL path
  * @param array $variableMap A mapping that maps variables to request parameters
  * @param array $defaults Defaults for map variables with keys as variable names
  * @param array $reqs Regular expression requirements for variables (keys as variable names)
  * @param Zend_Translate $translator Translator to use for this instance
  */
 public function __construct($route, $variableMap = array(), $defaults = array(), $reqs = array(), Zend_Translate $translator = null, $locale = null)
 {
     parent::__construct($route, $defaults, $reqs, $translator, $locale);
     $this->_variableMap = $variableMap;
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:16,代码来源:RequestVars.php

示例6: __construct

    /**
     * Route allowing matching of the HTTP_HOST
     *
     * $host => ':user.*.*' would match SpotSec.Foo.Com
     *
     * @param string $host
     * @param string $route
     * @param array $defaults
     * @param array $reqs
     */
    public function __construct($host, $route, array $defaults = array(), array $reqs = array())
    {
        $host = trim($host, $this->_urlDelimiter);

        if (!empty($host)) {
            // Separate foo.com into array('com', 'foo')
            $domains = array_reverse(explode(self::DOMAIN_SEPARATOR, $host));

            // Parse out url variables
            foreach ($domains as $pos => $part) {
                // Check if :var
                if (substr($part, 0, 1) == $this->_urlVariable) {
                    $name  = substr($part, 1);
                    $regex = isset($reqs[$name]) ? $reqs[$name] : $this->_defaultRegex;

                    // Set to be evaluated later
                    $this->_hostParts[$pos] = array('name' => $name, 'regex' => $regex);
                    $this->_hostVars[]      = $name;
                } else {
                    $this->_hostParts[$pos] = array('regex' => $part);

                    // Increment if not a *.*
                    if ($part !== self::DOMAIN_WILDCARD) {
                        $this->_hostStaticCount++;
                    }
                }
            }
        }

        parent::__construct($route, $defaults, $reqs);
    }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:41,代码来源:HttpHost.php

示例7: __construct

 /**
  * Prepares the route for mapping by splitting (exploding) it
  * to a corresponding atomic parts. These parts are assigned
  * a position which is later used for matching and preparing values.
  *
  * @param string $route Map used to match with later submitted URL path
  * @param array $defaults Defaults for map variables with keys as variable names
  * @param array $reqs Regular expression requirements for variables (keys as variable names)
  * @param Zend_Translate $translator Translator to use for this instance
  */
 public function __construct($route, $defaults = array(), $reqs = array(), Zend_Translate $translator = null, $locale = null)
 {
     $route = Axis::config('core/backend/route') . $this->_urlDelimiter . $route;
     parent::__construct($route, $defaults, $reqs, $translator, $locale);
 }
开发者ID:rommmka,项目名称:axiscommerce,代码行数:15,代码来源:Back.php

示例8: __construct

 /**
  * Process construct param and call parent::__construct() with params
  *
  * @param array $arguments
  */
 public function __construct(array $arguments)
 {
     parent::__construct($this->_getArgumentValue(self::PARAM_ROUTE, $arguments), $this->_getArgumentValue(self::PARAM_DEFAULTS, $arguments), $this->_getArgumentValue(self::PARAM_REQS, $arguments), $this->_getArgumentValue(self::PARAM_TRANSLATOR, $arguments), $this->_getArgumentValue(self::PARAM_LOCALE, $arguments));
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:9,代码来源:Abstract.php

示例9: __construct

 public function __construct($route = null, $defaults = array(), $reqs = array())
 {
     $route = 'admin/:module/:action/*';
     $defaults = array('module' => 'admin', 'controller' => 'admin', 'action' => 'index');
     parent::__construct($route, $defaults);
 }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:6,代码来源:AdminRoute.php


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