for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the PPI Framework.
*
* @copyright Copyright (c) 2011-2016 Paul Dragoonis <[email protected]>
* @license http://opensource.org/licenses/mit-license.php MIT
* @link http://www.ppi.io
*/
namespace PPI\Framework\Router\Wrapper;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouterInterface;
* @author Paul Dragoonis <[email protected]>
class SymfonyRouterWrapper implements RouterInterface
{
* @var RouterInterface
protected $router;
* @param RouterInterface $router
public function __construct(RouterInterface $router)
$this->setRouter($router);
}
public function setRouter(RouterInterface $router)
$this->router = $router;
* {@inheritdoc}
public function setContext(RequestContext $context)
$this->router->setContext($context);
public function getContext()
return $this->router->getContext();
public function getRouteCollection()
return $this->router->getRouteCollection();
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
return $this->router->generate($name, $parameters, $referenceType);
public function match($pathinfo)
return $this->router->match($pathinfo);