Controller $name set optimization

This commit is contained in:
Kyle Robinson Young 2012-03-28 11:37:27 -07:00
parent 0443fe1507
commit 33ab634aba

View file

@ -316,7 +316,7 @@ class Controller extends Object implements CakeEventListener {
*/
public function __construct($request = null, $response = null) {
if ($this->name === null) {
$this->name = substr(get_class($this), 0, strlen(get_class($this)) - 10);
$this->name = substr(get_class($this), 0, -10);
}
if ($this->viewPath == null) {