ARouter  0.1.0
Annotation based router for your projects
Creating the router

The easiest way of getting router object is to use RouterFactory class.

Getting simple router

To get a simple annotation based router just call

$router = RouterFactory::getRouter('directory')

and pass the path to the controllers directory as the first parameter. You can also provide custom HTTP message converters and argument resolvers as 2nd and 3rd arguments.

Getting cached router

To get a cached annotation based router just call

$router = RouterFactory::getCachedRouter('directory',
'cache/cacheFile.cache')

and pass the path to the controllers directory as the first parameter and optionally cache file name as a second argument.

You can also provide custom HTTP message converters and argument resolvers as 3rd and 4th arguments.

Cache clear

In order to clear the route mappings cache call

$router->getScanner()->clearCache();