public function isPosted($key = null)
    {
        if (isset($key)) {
            $value = $this->request->post($key, null);
            return isset($value);
        }

        return $this->server->requestMethod() === 'POST';
    }
public function isPosted($key = null)
    {
        if (isset($key)) {
            $value = $this->request->post($key, null);
            return isset($value);
        }

        return $this->server->requestMethod() === 'POST';
    }
public function isPosted ( $ key = null ) { if ( isset ( $ key ) ) { $ value = $ this -> request -> post ( $ key , null ) ; return isset ( $ value ) ; } return $ this -> server -> requestMethod ( ) === 'POST' ; }
Whether the key exists in POST query or current query is POST type
@param string|null $key
@return boolean
Whether the key exists in POST query or current query is POST type