public function &__get($name)
    {
        if (isset($this->deprecatedProperties[$name])) {
            $method = $this->deprecatedProperties[$name]['get'];
            deprecationWarning(
                "Accessing `{$name}` as a property will be removed in 4.0.0. " .
                "Use request->{$method} instead."
            );

            return $this->{$name};
        }

        deprecationWarning(sprintf(
            'Accessing routing parameters through `%s` will removed in 4.0.0. ' .
            'Use `getParam()` instead.',
            $name
        ));

        if (isset($this->params[$name])) {
            return $this->params[$name];
        }
        $value = null;

        return $value;
    }
public function &__get($name)
    {
        if (isset($this->deprecatedProperties[$name])) {
            $method = $this->deprecatedProperties[$name]['get'];
            deprecationWarning(
                "Accessing `{$name}` as a property will be removed in 4.0.0. " .
                "Use request->{$method} instead."
            );

            return $this->{$name};
        }

        deprecationWarning(sprintf(
            'Accessing routing parameters through `%s` will removed in 4.0.0. ' .
            'Use `getParam()` instead.',
            $name
        ));

        if (isset($this->params[$name])) {
            return $this->params[$name];
        }
        $value = null;

        return $value;
    }
public function & __get ( $ name ) { if ( isset ( $ this -> deprecatedProperties [ $ name ] ) ) { $ method = $ this -> deprecatedProperties [ $ name ] [ 'get' ] ; deprecationWarning ( "Accessing `{$name}` as a property will be removed in 4.0.0. " . "Use request->{$method} instead." ) ; return $ this -> { $ name } ; } deprecationWarning ( sprintf ( 'Accessing routing parameters through `%s` will removed in 4.0.0. ' . 'Use `getParam()` instead.' , $ name ) ) ; if ( isset ( $ this -> params [ $ name ] ) ) { return $ this -> params [ $ name ] ; } $ value = null ; return $ value ; }
Magic get method allows access to parsed routing parameters directly on the object.

Allows access to `$this->params['controller']` via `$this->controller`

@param string $name The property being accessed.
@return mixed Either the value of the parameter or null.
@deprecated 3.4.0 Accessing routing parameters through __get will removed in 4.0.0.
Use getParam() instead.
Magic get method allows access to parsed routing parameters directly on the object .