Dispatch a request

- « Yaf_Dispatcher::disableView

- Yaf_Dispatcher::enableView »

- PHP Manual
- Yaf_Dispatcher
- Dispatch a request

# Yaf_Dispatcher::dispatch

(Yaf >=1.0.0)

Yaf_Dispatcher::dispatch — Dispatch a request

### Description

public Yaf_Dispatcher::dispatch(Yaf_Request_Abstract `$request`): Yaf_Response_Abstract

This method does the heavy work of the Yaf_Dispatcher. It take a request object.

The dispatch process has three distinct events:

- Routing
- Dispatching
- Response

Routing takes place exactly once, using the values in the request object when Yaf_Dispatcher::dispatch() is called. Dispatching takes place in a loop; a request may either indicate multiple actions to dispatch, or the controller or a plugin may reset the request object to force additional actions to dispatch(see Yaf_Plugin_Abstract. When all is done, the Yaf_Dispatcher returns a response.

### Parameters

`request`

### Return Values