Cake\Console\Shell::__get PHP Method

__get() public method

Overload get for lazy building of tasks
public __get ( string $name ) : Shell
$name string The task to get.
return Shell Object of Task
    public function __get($name)
    {
        if (empty($this->{$name}) && in_array($name, $this->taskNames)) {
            $properties = $this->_taskMap[$name];
            $this->{$name} = $this->Tasks->load($properties['class'], $properties['config']);
            $this->{$name}->args =& $this->args;
            $this->{$name}->params =& $this->params;
            $this->{$name}->initialize();
            $this->{$name}->loadTasks();
        }
        return $this->{$name};
    }