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


PHP UrlGenerator::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param ReadSiteRepositoryInterface $siteRepository
  * @param CurrentSiteIdInterface      $currentSiteManager
  * @param RouteCollection             $routes
  * @param RequestContext              $context
  * @param RequestStack                $requestStack
  * @param NodeManager                 $nodeManager
  * @param LoggerInterface             $logger
  */
 public function __construct(ReadSiteRepositoryInterface $siteRepository, CurrentSiteIdInterface $currentSiteManager, RouteCollection $routes, RequestContext $context, RequestStack $requestStack, NodeManager $nodeManager, LoggerInterface $logger = null)
 {
     parent::__construct($routes, $context, $logger);
     $this->siteRepository = $siteRepository;
     $this->currentSiteManager = $currentSiteManager;
     $this->requestStack = $requestStack;
     $this->nodeManager = $nodeManager;
 }
开发者ID:open-orchestra,项目名称:open-orchestra-front-bundle,代码行数:19,代码来源:OpenOrchestraUrlGenerator.php

示例2: __construct

 public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null, $_locale = null)
 {
     /**
      * The $_locale parameter is automatically retrived from the container
      * if the LocaleService is availble
      */
     parent::__construct($routes, $context, $logger);
     $this->locale = $_locale;
 }
开发者ID:blendsdk,项目名称:blendengine,代码行数:9,代码来源:UrlGenerator.php

示例3: __construct

 /**
  * Constructor.
  *
  * @param \Symfony\Component\Routing\RouteCollection $routes
  * @param \Symfony\Component\Routing\RequestContext  $context
  * @param \Symfony\Component\HttpFoundation\Request  $request
  * @param array                                      $configuration
  */
 public function __construct(RouteCollection $routes, RequestContext $context, Request $request, $configuration)
 {
     parent::__construct($routes, $context);
     $this->preserve = $configuration['preserve'];
     $this->token = $configuration['token'];
     $this->tokenLen = $configuration['token_len'] ?: self::DEFAULT_TOKEN_LENGTH;
     if ($this->token) {
         $this->preserve[] = $this->token;
     }
     $this->params = $this->getParamsFromQuery($request->query);
     if ($this->token && !$this->params->has($this->token)) {
         $this->params->set($this->token, $this->generateToken());
     }
 }
开发者ID:mtrunkat,项目名称:php-enhanced-urlgenerator,代码行数:22,代码来源:EnhancedUrlGenerator.php

示例4: __construct

 public function __construct(\Pimple $container, RouteCollection $routes, RequestContext $context)
 {
     $this->container = $container;
     $this->routes = $routes;
     parent::__construct($routes, $context);
 }
开发者ID:devture,项目名称:silex-localization-bundle,代码行数:6,代码来源:LocaleAwareUrlGenerator.php

示例5: __construct

 public function __construct(UrlGeneratorInterface $generator, RequestContext $context, LoggerInterface $logger = null)
 {
     parent::__construct(new RouteCollection(), $context, $logger);
     $this->generator = $generator;
 }
开发者ID:elfet,项目名称:silicone,代码行数:5,代码来源:UrlGeneratorDecorator.php

示例6: __construct

 /**
  * @param RequestContext  $context
  * @param CacheInterface  $cache
  * @param LoggerInterface $logger
  */
 public function __construct(RequestContext $context, CacheInterface $cache, LoggerInterface $logger = null)
 {
     parent::__construct(new RouteCollection(), $context, $logger);
     $this->cache = $cache;
 }
开发者ID:yoyosan,项目名称:BlablacarI18nRoutingBundle,代码行数:10,代码来源:UrlGenerator.php


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