Skip to content

Instantly share code, notes, and snippets.

@dmregister
Created April 28, 2015 18:27
Show Gist options
  • Save dmregister/eef14daeb98e29a7937c to your computer and use it in GitHub Desktop.
Save dmregister/eef14daeb98e29a7937c to your computer and use it in GitHub Desktop.
url view helper
use Zend\View\Helper\Url;
use Zend\Mvc\Router\Http\TreeRouteStack;
class MyUrl extends Url
{
public function __construct(TreeRouteStack $router)
{
$this->setRouter($router);
}
public function generate($name = null, $params = array(), $options = array(), $reuseMatchedParams = false)
{
return call_user_func(Url, array($name, $params, $options , $reuseMatchedParams));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment