本文整理汇总了PHP中Trace::getRouteTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Trace::getRouteTable方法的具体用法?PHP Trace::getRouteTable怎么用?PHP Trace::getRouteTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::getRouteTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect
/**
* Helper method that creates an action method result encapsulating redirection
*
* @param string $routeName name of the route to use when building an address.
* Route must be presented in IRouteTable
* @param array $parameters parameters to pass to Route for building an address
*
* @return RedirectToRouteResult
*/
protected function redirect($routeName, array $parameters = array())
{
$url = $this->trace->getWebContext()->getRequest()->getHttpUrl()->spawnBase();
$this->trace->getRouteTable()->getRoute($routeName)->compose($url, $parameters);
return new RedirectResult($url);
}
示例2: setTrace
/**
* Sets the trace used to invoke the MVC stack
*
* @param Trace $trace
*
* @return UIViewPresentation
*/
function setTrace(Trace $trace)
{
$this->trace = $trace;
if (!$this->routeTable) {
$this->routeTable = $trace->getRouteTable();
}
return $this;
}