intahwebz / routing
Installs: 153
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/intahwebz/routing
Requires
- intahwebz/core: >=0.2.4
- intahwebz/mb_extra: *
Requires (Dev)
- intahwebz/jig: dev-master
- phpunit/phpunit: 3.7.*
- rdlowrey/auryn: dev-PluginExperiment2
- zendframework/zend-permissions-acl: >=2.1.0
README
A component for mapping URLs to controllers and parsing variables.
$contentView = [Resource::CONTENT, Privilege::VIEW];
$adminView = [Resource::ADMIN, Privilege::VIEW];
array(
    array(
        'name' => 'image',
        'pattern' => '/{path}/{imageID}/{size}/{filename}',
        'callable' => array(
            'BaseReality\\ImageController',
            'showImage',
        ),
        'requirements' => array(
            'imageID' => '\d+',
            'size' => '\w+',
            'filename' => '[^/]+',
            'path' => "(image|proxy)",
        ),
        'defaults' => array(
            'path' => 'image',
            'size' => null
        ),
        'optional' => array(
    
        )
    ),
    
     array(
        'name' => 'homepage',
        'pattern' => '/',
        'callable' =>array(
            BaseReality\Controller\HomePage::class,
            'show',
        ),
        'access' => $contentView,
     ),
 
 ),