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


PHP Route::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Create a new Route object.
  *
  * @param string $method
  * @param string $path
  *
  * @param mixed  $handler
  */
 public function __construct($method, $path, $handler)
 {
     // Set Route name
     $this->name = $this->extractFromHandler('as', $handler);
     // Init Parent
     parent::__construct($path, ['action' => $this->extractFromHandler('uses', $handler, null, true)], $this->extractFromHandler('requirements', $handler, []), $this->extractFromHandler('options', $handler, []), $this->extractFromHandler('domain', $handler, ''), $this->extractFromHandler('schemes', $handler, []), [$method]);
 }
开发者ID:lampsace,项目名称:kernel,代码行数:15,代码来源:Route.php

示例2: __construct

 public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '')
 {
     parent::__construct($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
     $this->accessPublic();
     $this->secureByLoginSecurity();
     $this->setDefault(RouteAttribute::LOCALE, null);
 }
开发者ID:blendsdk,项目名称:blendengine,代码行数:7,代码来源:Route.php

示例3: __construct

 public function __construct($pattern, array $defaults = array(), array $requirements = array(), array $options = array())
 {
     parent::__construct($pattern, $defaults, $requirements, $options);
     // Set default format to HTML if none is explicitly set
     if (!isset($defaults['_format'])) {
         $this->setFormat($this->_defaultFormat);
     }
 }
开发者ID:mothership-ec,项目名称:cog,代码行数:8,代码来源:Route.php

示例4: __construct

 public function __construct($path = '/', array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array())
 {
     parent::__construct($path, $defaults, $requirements, $options, $host, $schemes, $methods);
 }
开发者ID:allmarkedup,项目名称:super-sharp-router,代码行数:4,代码来源:Route.php

示例5: __construct

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * compiler_class: A class name able to compile this route instance (RouteCompiler by default)
  *
  * @param string       $path         The path pattern to match
  * @param array        $defaults     An array of default parameter values
  * @param array        $requirements An array of requirements for parameters (regexes)
  * @param array        $options      An array of options
  * @param string       $host         The host pattern to match
  * @param string|array $schemes      A required URI scheme or an array of restricted schemes
  * @param string|array $methods      A required HTTP method or an array of restricted methods
  */
 public function __construct($path = '/', array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array())
 {
     // overridden constructor to make $path optional
     parent::__construct($path, $defaults, $requirements, $options, $host, $schemes, $methods);
 }
开发者ID:johnWIll17,项目名称:silex-blog,代码行数:20,代码来源:Route.php

示例6: __construct

 public function __construct($pattern = '', array $defaults = array(), array $requirements = array(), array $options = array())
 {
     parent::__construct($pattern, $defaults, $requirements, $options);
 }
开发者ID:ronzalo,项目名称:dyl_s2,代码行数:4,代码来源:sismo.php

示例7: __construct

 /**
  * Constructor.
  *
  * Available options:
  *
  *  * compiler_class: A class name able to compile this route instance (RouteCompiler by default)
  *
  * @param string       $name         Name of the route
  * @param string       $path         The path pattern to match
  * @param array        $defaults     An array of default parameter values
  * @param array        $requirements An array of requirements for parameters (regexes)
  * @param array        $options      An array of options
  * @param string       $host         The host pattern to match
  * @param string|array $schemes      A required URI scheme or an array of restricted schemes
  * @param string|array $methods      A required HTTP method or an array of restricted methods
  *
  * @api
  */
 public function __construct($name, $path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array())
 {
     $this->setName($name);
     parent::__construct($path, $defaults, $requirements, $options, $host, $schemes, $methods);
     $this->updatedAt = new \DateTime();
 }
开发者ID:geoffreytran,项目名称:zym,代码行数:24,代码来源:Route.php

示例8: __construct

 /**
  * @param string          $method
  * @param array           $path
  * @param string|callable $action
  */
 public function __construct($method, $path, $action)
 {
     parent::__construct($path, ['action' => $action], [], [], null, [], $method, null);
 }
开发者ID:cotapreco,项目名称:kernel,代码行数:9,代码来源:ResolveableActionRoute.php

示例9: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct($this->routePattern);
     $this->setDefaults(array());
 }
开发者ID:tadcka,项目名称:routing,代码行数:8,代码来源:Route.php

示例10: __construct

 public function __construct()
 {
     parent::__construct('/');
     $this->children = array();
 }
开发者ID:uneak,项目名称:RoutesManagerBundle,代码行数:5,代码来源:AbstractRoute.php

示例11: __construct

 /**
  * Constructor.
  *
  * Available requirements:
  *  - HTTP_<<headername>> : HTTP header value required
  *
  * @param string $pattern      The pattern to match
  * @param array  $defaults     An array of default parameter values
  * @param array  $requirements An array of requirements for parameters (regexes)
  * @param array  $options      An array of options
  */
 public function __construct($pattern, array $defaults = array(), array $requirements = array(), array $options = array())
 {
     parent::__construct($pattern, $defaults, $requirements, $options);
     $this->_addHeaderRequirements();
 }
开发者ID:gobjila,项目名称:BackBee,代码行数:16,代码来源:Route.php


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