ARouter  0.1.0
Annotation based router for your projects
RouterFactory Class Reference

Static Public Member Functions

static getRouter (string $controllersDirectory, array $converters=[], array $resolvers=[])
 
static getCachedRouter (string $controllersDirectory, string $cacheFilePath=NULL, array $converters=[], array $resolvers=[])
 

Detailed Description

Used to construct and return different kind of routers.

Member Function Documentation

◆ getCachedRouter()

static getCachedRouter ( string  $controllersDirectory,
string  $cacheFilePath = NULL,
array  $converters = [],
array  $resolvers = [] 
)
static

Get cached annotation based router.

The difference between this router and simple router is that cached router uses cached Route mappings scanner.

Parameters
string$controllersDirectoryDirectory where controllers are stored.
string$cacheFilePathCache file path.

◆ getRouter()

static getRouter ( string  $controllersDirectory,
array  $converters = [],
array  $resolvers = [] 
)
static

Get simple annotation based router.

Created router has all provided by this library argument resolvers, and use provided by this library Route mappings scanner.

Parameters
string$controllersDirectoryDirectory where controllers are stored.

The documentation for this class was generated from the following file: