Custom Routes in PHP App?

I'm using a cutom routing script to handle my application's URLs.  An example of my index.php might look like this:

include('router.php');
include('init.class.php');

respond('/dashboard/[:date]/', function($request, $response)
{
    include('controllers/ctrlDashboard.php');
});


In the above example, I'm including my application's classes in the include before establishing the route.

The problem I am having is that when I am in PHPStorm, controllers/ctrlDashboard.php has no intelligence connecting this script back to index.php.  Therefore I'm getting a ton of unreferenced errors and no inline-autocompletion of my classes.

Am I dealing with a configuration issue on my part, or is this something I just have to deal with?

Thanks!

3 comments
Comment actions Permalink

Have you tried to find/create IDE helper for this?

0
Comment actions Permalink

No, I just Googled for it and can't find any information on what an IDE Helper is in PHPStorm

0
Comment actions Permalink

This is something like stubs (also see for explanation http://youtrack.jetbrains.com/issue/WI-174).
Also example of IDE helper: https://github.com/laravelbook/laravel4-phpstorm-helper .

0

Please sign in to leave a comment.