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


PHP Router::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Router constructor.
  * @param Dispatcher $events
  * @param Container $container
  */
 public function __construct(Dispatcher $events, Container $container)
 {
     parent::__construct($events, $container);
     $this->setRoutes(new RouteCollection());
     $this->adapterService = new AdapterService($this->container);
     $this->setDefaultAdapter(MainAdapter::name);
 }
开发者ID:neneax,项目名称:multi-routing,代码行数:12,代码来源:Router.php

示例2: __construct

 /**
  * Load resource defaults and call parent
  *
  * @param Illuminate\Events\Dispatcher $events
  * @param Illuminate\Container\Container $container
  * @param Illuminate\Config\Repository $config
  * @param array $resourceDefaults
  * @return void
  */
 public function __construct($events, $container, $config, $resourceDefaults)
 {
     // Capture config
     $this->config = $config;
     // Load defaults
     $this->resourceDefaults = $resourceDefaults;
     // Hand off to parent
     return parent::__construct($events, $container);
 }
开发者ID:lakedawson,项目名称:apirouter,代码行数:18,代码来源:ApiRouter.php

示例3: __construct

 /**
  * Router constructor method
  *
  * @param \Illuminate\Contracts\Events\Dispatcher   $events
  * @param \Illuminate\Container\Container|null      $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->config = Config::get('lera');
     $this->createResources();
 }
开发者ID:hbarroso,项目名称:lera,代码行数:12,代码来源:Router.php

示例4: __construct

 /**
  * Create a new Router instance.
  *
  * @param  Dispatcher  $events
  * @param  Container  $container
  * @return void
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->routes = new RouteCollection();
 }
开发者ID:sleeping-owl,项目名称:route-priority,代码行数:12,代码来源:Router.php

示例5: __construct

 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->version = substr($container::VERSION, 0, 3);
 }
开发者ID:wuxw,项目名称:LaravelFly,代码行数:5,代码来源:Router.php

示例6: __construct

 /**
  * Create a new router instance.
  *
  * @param \Illuminate\Events\Dispatcher   $events
  * @param \Dingo\Api\Properties           $properties
  * @param \Illuminate\Container\Container $container
  *
  * @return void
  */
 public function __construct(Dispatcher $events, Properties $properties, Container $container = null)
 {
     $this->properties = $properties;
     $this->api = new GroupCollection($properties);
     parent::__construct($events, $container);
 }
开发者ID:jacobDaeHyung,项目名称:api,代码行数:15,代码来源:Router.php

示例7: __construct

 /**
  * Create a new Router instance.
  *
  * @param \Illuminate\Contracts\Events\Dispatcher $events
  * @param \Illuminate\Container\Container $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     // Add all registered named route middlewares after all service providers have been loaded
     app('events')->listen('bootstrapped: ' . BootProviders::class, RegisterRouteMiddleware::class);
 }
开发者ID:sebastiaanluca,项目名称:laravel-router,代码行数:12,代码来源:ExtendedRouter.php

示例8: __construct

 /**
  * Setup options for routing and pass container to parent
  *
  * @param  \Illuminate\Container\Container  $container
  * @return void
  */
 public function __construct(\Illuminate\Container\Container $container = null)
 {
     parent::__construct($container);
     $this->setOptions();
     $this->setExpressions();
 }
开发者ID:sorora,项目名称:ext-route,代码行数:12,代码来源:ExtRoute.php

示例9: __construct

 /**
  * Create a new TranslatorRouter instance.
  *
  * @param  \Translator\Localizer  $localizer
  * @param  \Illuminate\Contracts\Events\Dispatcher  $events
  * @param  \Illuminate\Container\Container  $container
  * @return void
  */
 public function __construct(Localizer $localizer, Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->localizer = $localizer;
 }
开发者ID:aewebsolutions,项目名称:laravel-translator,代码行数:13,代码来源:TranslatorRouter.php

示例10: __construct

 /**
  * Router constructor.
  *
  * @param Dispatcher     $events
  * @param Container|null $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
 }
开发者ID:donny5300,项目名称:modulair-router,代码行数:10,代码来源:Router.php


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