public function get($name = null, $default = null)
    {
        $value = null;

        if (null === $name) {
            $value = $this->data;
        } elseif (isset($this->data[$name])) {
            $value = $this->data[$name];
        } elseif (null !== $default) {
            $value = $default;
        } else {
            throw new \Exception('Key not found in data ! (key: ' . $name . ')');
        }

        return $value;
    }
public function get($name = null, $default = null)
    {
        $value = null;

        if (null === $name) {
            $value = $this->data;
        } elseif (isset($this->data[$name])) {
            $value = $this->data[$name];
        } elseif (null !== $default) {
            $value = $default;
        } else {
            throw new \Exception('Key not found in data ! (key: ' . $name . ')');
        }

        return $value;
    }
public function get ( $ name = null , $ default = null ) { $ value = null ; if ( null === $ name ) { $ value = $ this -> data ; } elseif ( isset ( $ this -> data [ $ name ] ) ) { $ value = $ this -> data [ $ name ] ; } elseif ( null !== $ default ) { $ value = $ default ; } else { throw new \ Exception ( 'Key not found in data ! (key: ' . $ name . ')' ) ; } return $ value ; }
Get request data.

@param  string $name
@param  mixed  $default
@return mixed   Value
@throws \Exception
Get request data .