method; } /** * Get the request path. * * @since 3.0.0 * @see API_Request::get_path() * @return string */ public function get_path() { return $this->path; } /** * Get the request parameters. * * @since 3.0.0 * @see API_Request::get_params() * @return array */ public function get_params() { return $this->params; } /** * Get the request data. * * @since 3.0.0 * @return array */ public function get_data() { return $this->data; } /** API Helper Methods ******************************************************/ /** * Get the string representation of this request. * * @since 3.0.0 * @see API_Request::to_string() * @return string */ public function to_string() { $data = $this->get_data(); return ! empty( $data ) ? wp_json_encode( $data ) : ''; } /** * Get the string representation of this request with any and all sensitive elements masked * or removed. * * @since 3.0.0 * @see API_Request::to_string_safe() * @return string */ public function to_string_safe() { return $this->to_string(); } }