Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
web/vendor/symfony-cmf/routing/DependencyInjection/Compiler
53
web/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php
vendored
Normal file
53
web/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony CMF package.
|
||||
*
|
||||
* (c) 2011-2015 Symfony CMF
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Cmf\Component\Routing\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* This compiler pass adds additional route enhancers
|
||||
* to the dynamic router.
|
||||
*
|
||||
* @author Daniel Leech <dan.t.leech@gmail.com>
|
||||
* @author Nathaniel Catchpole (catch)
|
||||
*/
|
||||
class RegisterRouteEnhancersPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $dynamicRouterService;
|
||||
|
||||
protected $enhancerTag;
|
||||
|
||||
public function __construct($dynamicRouterService = 'cmf_routing.dynamic_router', $enhancerTag = 'dynamic_router_route_enhancer')
|
||||
{
|
||||
$this->dynamicRouterService = $dynamicRouterService;
|
||||
$this->enhancerTag = $enhancerTag;
|
||||
}
|
||||
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition($this->dynamicRouterService)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$router = $container->getDefinition($this->dynamicRouterService);
|
||||
|
||||
foreach ($container->findTaggedServiceIds($this->enhancerTag) as $id => $attributes) {
|
||||
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
|
||||
$router->addMethodCall('addRouteEnhancer', array(new Reference($id), $priority));
|
||||
}
|
||||
}
|
||||
}
|
54
web/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php
vendored
Normal file
54
web/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony CMF package.
|
||||
*
|
||||
* (c) 2011-2015 Symfony CMF
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Cmf\Component\Routing\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
/**
|
||||
* Compiler pass to register routers to the ChainRouter.
|
||||
*
|
||||
* @author Wouter J <waldio.webdesign@gmail.com>
|
||||
* @author Henrik Bjornskov <henrik@bjrnskov.dk>
|
||||
* @author Magnus Nordlander <magnus@e-butik.se>
|
||||
*/
|
||||
class RegisterRoutersPass implements CompilerPassInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $chainRouterService;
|
||||
|
||||
protected $routerTag;
|
||||
|
||||
public function __construct($chainRouterService = 'cmf_routing.router', $routerTag = 'router')
|
||||
{
|
||||
$this->chainRouterService = $chainRouterService;
|
||||
$this->routerTag = $routerTag;
|
||||
}
|
||||
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition($this->chainRouterService)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition($this->chainRouterService);
|
||||
|
||||
foreach ($container->findTaggedServiceIds($this->routerTag) as $id => $attributes) {
|
||||
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
|
||||
|
||||
$definition->addMethodCall('add', array(new Reference($id), $priority));
|
||||
}
|
||||
}
|
||||
}
|
Reference in a new issue