File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Overblog \ThriftBundle \Routing ;
1313
14+ use Symfony \Component \HttpKernel \Kernel ;
1415use Symfony \Component \Config \Loader \Loader ;
1516use Symfony \Component \Routing \Route ;
1617use Symfony \Component \Routing \RouteCollection ;
@@ -27,18 +28,23 @@ public function __construct($services)
2728 /**
2829 * Loads a resource.
2930 *
30- * @param mixed $resource The resource
31- * @param string|null $type The resource type or null if unknown
31+ * @param mixed $resource The resource
32+ * @param string|null $type The resource type or null if unknown
3233 *
34+ * @return RouteCollection
3335 * @throws \Exception If something went wrong
3436 */
3537 public function load ($ resource , $ type = null )
3638 {
39+ $ controllerArg = Kernel::VERSION_ID > 40000 ?
40+ 'Overblog\ThriftBundle\Controller\ThriftController::serverAction ' :
41+ 'ThriftBundle:Thrift:server ' ;
42+
3743 $ coll = new RouteCollection ();
3844 foreach ($ this ->services as $ path => $ service ) {
3945 $ route = new Route (
4046 '/ ' .$ path ,
41- ['_controller ' => ' ThriftBundle:Thrift:server ' , 'extensionName ' => $ path ],
47+ ['_controller ' => $ controllerArg , 'extensionName ' => $ path ],
4248 [],
4349 [],
4450 null ,
You can’t perform that action at this time.
0 commit comments