Skip to content

Instantly share code, notes, and snippets.

@phalcon

phalcon/r.php Secret

Last active December 22, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phalcon/de473f88ee70d0462155 to your computer and use it in GitHub Desktop.
Save phalcon/de473f88ee70d0462155 to your computer and use it in GitHub Desktop.
<?php
$di = new Phalcon\DI();
$di['url'] = function()
{
return new Phalcon\Mvc\Url();
};
$di['router'] = function()
{
$router = new Phalcon\Mvc\Router(false);
$router->add('/products', array(
'controller'=>'products',
'action'=>'index'
))->setName('products');
return $router;
};
echo $di['url']->get(array('for' => 'products'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment