Cake\Controller\Controller::__set PHP Method

__set() public method

Magic setter for removed properties.
public __set ( string $name, mixed $value ) : void
$name string Property name.
$value mixed Value to set.
return void
    public function __set($name, $value)
    {
        $deprecated = ['layout' => 'layout', 'view' => 'template', 'theme' => 'theme', 'autoLayout' => 'autoLayout', 'viewPath' => 'templatePath', 'layoutPath' => 'layoutPath'];
        if (isset($deprecated[$name])) {
            $method = $deprecated[$name];
            trigger_error(sprintf('Controller::$%s is deprecated. Use $this->viewBuilder()->%s() instead.', $name, $method), E_USER_DEPRECATED);
            $this->viewBuilder()->{$method}($value);
            return;
        }
        $this->{$name} = $value;
    }