Suppose I have a file called routes.php
containing routes for my webapp:
use Symfony\Component\Routing; $routes = new Routing\RouteCollection(); // Add routes here return $routes;
This file is then included in my front controller as follows:
$routes = include 'routes.php';
Clearly this $routes
object is of type RouteCollection
. However, Eclipse doesn't seem to be aware of this, and as such I can't view the the object's methods when I start typing $routes->
which makes it difficult to know what methods and parameters are available to me.
Is there any way for me to hint at the return type of my routes.php
file? I've tried adding an annotation @return \Symfony\Component\Routing\RouteCollection
at the top of the routes file, but this doesn't seem to make any difference.
I'm using Eclipse 4.2 with the Aptana Studio 3 plugin. If this is a limitation specific to Aptana, would PDT handle this differently?