src/FormParameter/ParameterRegistry.php
public function data($name = null)
    {
        if ($this->_Controller->request->is('get')) {
            if (empty($name)) {
                return $this->_Controller->request->query;
            } else {
                return $this->_Controller->request->query($name);
            }
        } elseif ($this->_Controller->request->is(['post', 'put'])) {
            if (empty($name)) {
                return $this->_Controller->request->data[$this->formName];
            } else {
                return $this->_Controller->request->data($this->fieldName($name));
            }
        }

        return null;
    }
public function data($name = null)
    {
        if ($this->_Controller->request->is('get')) {
            if (empty($name)) {
                return $this->_Controller->request->query;
            } else {
                return $this->_Controller->request->query($name);
            }
        } elseif ($this->_Controller->request->is(['post', 'put'])) {
            if (empty($name)) {
                return $this->_Controller->request->data[$this->formName];
            } else {
                return $this->_Controller->request->data($this->fieldName($name));
            }
        }

        return null;
    }
public function data ( $ name = null ) { if ( $ this -> _Controller -> request -> is ( 'get' ) ) { if ( empty ( $ name ) ) { return $ this -> _Controller -> request -> query ; } else { return $ this -> _Controller -> request -> query ( $ name ) ; } } elseif ( $ this -> _Controller -> request -> is ( [ 'post' , 'put' ] ) ) { if ( empty ( $ name ) ) { return $ this -> _Controller -> request -> data [ $ this -> formName ] ; } else { return $ this -> _Controller -> request -> data ( $ this -> fieldName ( $ name ) ) ; } } return null ; }
Returns parameter value based by it's name

@param string $name Parameter name.
@return mixed
Returns parameter value based by it s name