Set controller name

- « Yaf_Request_Abstract::setBaseUri

- Yaf_Request_Abstract::setDispatched »

- PHP Manual
- Yaf_Request_Abstract
- Set controller name

# Yaf_Request_Abstract::setControllerName

(Yaf >=1.0.0)

Yaf_Request_Abstract::setControllerName — Set controller name

### Description

public Yaf_Request_Abstract::setControllerName(string `$controller`, bool `$format_name` = true): void

set controller name to request, this is usually used by custom router to set route result controller name.

### Parameters

`controller`

  string, controller name, this should be in camel style, like "Index" or "Foo_Bar"

`format_name`

  this is introduced in Yaf 3.2.0, by default Yaf will format the name into camel mode, if this is set to `false` , Yaf will set the original name to request.

### Return Values