Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created September 25, 2012 18:52
Show Gist options
  • Select an option

  • Save weierophinney/3783719 to your computer and use it in GitHub Desktop.

Select an option

Save weierophinney/3783719 to your computer and use it in GitHub Desktop.
Alternate config
<?php
return array(
'router' => array('routes' => array(
'api' => array(
'type' => 'Segment',
'options' => array(
'route' => '/api/v1/:controller[/:id]',
'defaults' => array(
'__NAMESPACE__' => 'Api\V1\Controller',
'controller' => 'User', // just an example
),
),
),
)),
'controllers' => array(
'invokables' => array(
'Api\V1\Controller\User' => 'Api\Controller\UserController',
'Api\V1\Controller\Group' => 'Api\Controller\GroupController',
// etc.
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment