yii\di\ServiceLocator::__get PHP Method

__get() public method

This method is overridden to support accessing components like reading properties.
public __get ( string $name ) : mixed
$name string component or property name
return mixed the named property value
    public function __get($name)
    {
        if ($this->has($name)) {
            return $this->get($name);
        } else {
            return parent::__get($name);
        }
    }