2017 © Pedro Peláez
 

library routing

image

intahwebz/routing

  • Tuesday, March 3, 2015
  • by Danack
  • Repository
  • 1 Watchers
  • 1 Stars
  • 144 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

intahwebz-routing

A component for mapping URLs to controllers and parsing variables., (*1)

$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,
     ),

 ),

```, (*2)

The Versions