當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。