Skip to content

Instantly share code, notes, and snippets.

@xboston
Created January 9, 2014 14:24
Show Gist options
  • Save xboston/8334860 to your computer and use it in GitHub Desktop.
Save xboston/8334860 to your computer and use it in GitHub Desktop.
Phalcon notFound test
<?php
$router = new Phalcon\Mvc\Router(false);
$router->notFound(array(
'controller' => 'user',
'action' => 'show404'
));
$router->add('/login/', array(
'controller' => 'user',
'action' => 'login'
));
$router->handle('/test/');
$r = $router->getMatchedRoute();
echo $router->getActionName();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment