php8.5
Home/ Manual/ yaf / yaf_request_abstract/ Yaf_Request_Abstract::isDispatched

Yaf_Request_Abstract::isDispatched

PHP function Edit on GitHub ✎

(Yaf >=1.0.0)

Determine if the request is dispatched

Description

Yaf_Request_Abstract::isDispatched(): bool

Determine whether the request has been dispatched.

Parameters Parameters

Return Values

Returns true if the request has been dispatched, false otherwise.

Examples

Yaf_Request_Abstract::isDispatched example

php
<?php
class IndexController extends Yaf_Controller_Abstract
{
    public function indexAction()
    {
        // Stop the dispatch loop, no further action will be dispatched
        $this->getRequest()->setDispatched();

        var_dump($this->getRequest()->isDispatched());
    }
}
?>

The above example will output something similar to:

output
bool(true)

See Also

  • Yaf_Dispatcher::dispatch
  • Yaf_Request_Abstract::setDispatched

Source: reference/yaf/yaf_request_abstract/isdispatched.xml · from the official PHP manual (php/doc-en)