Permalink
Browse files

add support for services

  • Loading branch information...
1 parent 40eb1f4 commit 386530f571d3888b19a6cfc0b3753f4c4731cb33 @aizatto committed Jan 26, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 ControllerResolver.php
@@ -18,6 +18,12 @@ protected function createController($controller) {
}
list($bundle, $controller) = explode(':', $controller);
+ $service = $bundle;
+ if ($this->container->has($service)) {
+ $method = $controller;
+ return array($this->container->get($service), $method);
+ }
+
$bundles = $this->container->get('kernel')->getBundle($bundle, false);
$class = null;
foreach ($bundles as $b) {

0 comments on commit 386530f

Please sign in to comment.