kahlan\Given::__get PHP Method

__get() public method

Getter.
public __get ( string $key ) : mixed
$key string The name of the variable.
return mixed The value of the variable.
    public function &__get($key)
    {
        if (array_key_exists($key, $this->_data)) {
            return $this->_data[$key];
        }
        if ($this->_parent !== null) {
            return $this->_parent->__get($key);
        }
        throw new Exception("Undefined variable `{$key}`.");
    }