(Yaf >=1.0.0)
Yaf_Request_Abstract::isDispatched — 判断请求是否已分发
此函数没有参数。
如果请求已被分发则返回 true,否则返回 false。
示例 #1 Yaf_Request_Abstract::isDispatched() 示例
<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction()
{
// 停止分发循环,不再分发后续的 action
$this->getRequest()->setDispatched();
var_dump($this->getRequest()->isDispatched());
}
}
?>以上示例的输出类似于:
bool(true)