Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaned Bundle

  • Loading branch information...
commit dad422791f62a02caf746b3d3ff12620a7ab28b7 1 parent 0ee8141
Francis Besset francisbesset authored
4 BeSimpleI18nRoutingBundle.php
View
@@ -2,9 +2,9 @@
namespace BeSimple\I18nRoutingBundle;
-use Symfony\Component\HttpKernel\Bundle\Bundle;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
use BeSimple\I18nRoutingBundle\DependencyInjection\Compiler\OverrideRoutingCompilerPass;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\Bundle\Bundle;
class BeSimpleI18nRoutingBundle extends Bundle
{
4 DependencyInjection/BeSimpleI18nRoutingExtension.php
View
@@ -2,10 +2,10 @@
namespace BeSimple\I18nRoutingBundle\DependencyInjection;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
-use Symfony\Component\Config\FileLocator;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
class BeSimpleI18nRoutingExtension extends Extension
{
1  Routing/I18nRoute.php
View
@@ -2,6 +2,7 @@
namespace BeSimple\I18nRoutingBundle\Routing;
+use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class I18nRoute
7 Routing/Loader/XmlFileLoader.php
View
@@ -2,9 +2,10 @@
namespace BeSimple\I18nRoutingBundle\Routing\Loader;
+use BeSimple\I18nRoutingBundle\Routing\I18nRoute;
use Symfony\Component\Routing\Loader\XmlFileLoader as BaseXmlFileLoader;
+use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
-use BeSimple\I18nRoutingBundle\Routing;
class XmlFileLoader extends BaseXmlFileLoader
{
@@ -48,11 +49,11 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $definiti
}
if ($locales) {
- $route = new Routing\I18nRoute((string) $definition->getAttribute('id'), $locales, $defaults, $requirements, $options);
+ $route = new I18nRoute((string) $definition->getAttribute('id'), $locales, $defaults, $requirements, $options);
$collection->addCollection($route->getCollection());
} else {
- $route = new Routing\Route((string) $definition->getAttribute('pattern'), $defaults, $requirements, $options);
+ $route = new Route((string) $definition->getAttribute('pattern'), $defaults, $requirements, $options);
$collection->add((string) $definition->getAttribute('id'), $route);
}
2  Routing/Loader/YamlFileLoader.php
View
@@ -3,9 +3,9 @@
namespace BeSimple\I18nRoutingBundle\Routing\Loader;
use BeSimple\I18nRoutingBundle\Routing\I18nRoute;
-use BeSimple\I18nRoutingBundle\Routing\Route;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Loader\YamlFileLoader as BaseYamlFileLoader;
+use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Yaml\Yaml;
58 Routing/Route.php
View
@@ -1,58 +0,0 @@
-<?php
-
-namespace BeSimple\I18nRoutingBundle\Routing;
-
-use Symfony\Component\Routing\Route as BaseRoute;
-
-class Route extends BaseRoute
-{
- static protected $compilers = array();
-
- protected $isI18n;
-
- /**
- * Constructor.
- *
- * Available options:
- *
- * * See Route class
- *
- * @param string $pattern The pattern to match
- * @param array $defaults An array of default parameter values
- * @param array $requirements An array of requirements for parameters (regexes)
- * @param array $options An array of options
- * @param boolean $isI18n If the route is an i18nRoute
- */
- public function __construct($pattern, array $defaults = array(), array $requirements = array(), array $options = array(), $isI18n = false)
- {
- $this->setIsI18n($isI18n);
-
- parent::__construct($pattern, $defaults, $requirements, $options);
- }
-
- /**
- * Return true if the route is an i18nRoute
- *
- * @return boolean Is i18nRoute
- */
- public function isI18n()
- {
- return (bool)$this->isI18n;
- }
-
- /**
- * Set i18nRoute.
- *
- * This method implements a fluent interface.
- *
- * @param boolean $i18nRoute The I18nRoute
- *
- * @return Route The current Route instance
- */
- public function setIsI18n($isI18n)
- {
- $this->isI18n = $isI18n;
-
- return $this;
- }
-}
2  Routing/Router.php
View
@@ -2,9 +2,9 @@
namespace BeSimple\I18nRoutingBundle\Routing;
-use Symfony\Component\Routing\Router as BaseRouter;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\Session;
+use Symfony\Component\Routing\Router as BaseRouter;
class Router extends BaseRouter
{
Please sign in to comment.
Something went wrong with that request. Please try again.