Skip to content

Instantly share code, notes, and snippets.

@phalcon
Created January 4, 2013 16:46
Show Gist options
  • Select an option

  • Save phalcon/4454024 to your computer and use it in GitHub Desktop.

Select an option

Save phalcon/4454024 to your computer and use it in GitHub Desktop.
<?php
$router = new Phalcon\Mvc\Router(false);
$router->add('/:controller',
array(
'module' => 'common',
'controller' => 1
)
);
$router->add('/:controller/:action/:params',
array(
'module' => 'common',
'controller' => 1,
'action' => 2,
'params' => 3
)
);
$router->add('/:controller/:action/{pk}/page/{page}'
array(
'module' => 'common',
'controller' => 1,
'action' => 2
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment