meters. $params = array_diff_key( self::$get, $this->config->get_config( 'cache_ignored_parameters' ) ); if ( $params ) { ksort( $params ); } return $params; } /** * Get the query string with sorted parameters, and some other removed. * * @since 3.3 * @author Grégory Viguier * * @return string */ public function get_query_string() { return http_build_query( $this->get_query_params() ); } /** * Get the original query string * * @since 3.11.4 * * @return string */ public function get_original_query_string() { return http_build_query( $this->get_get() ); } /** ----------------------------------------------------------------------------------------- */ /** PROPERTY GETTERS ======================================================================== */ /** ----------------------------------------------------------------------------------------- */ /** * Get the `cookies` property. * * @since 3.3 * @author Grégory Viguier * * @return array */ public function get_cookies() { return self::$cookies; } /** * Get the `post` property. * * @since 3.3 * @author Grégory Viguier * * @return array */ public function get_post() { return self::$post; } /** * Get the `get` property. * * @since 3.3 * @author Grégory Viguier * * @return array */ public function get_get() { return self::$get; } /** ----------------------------------------------------------------------------------------- */ /** ERRORS ================================================================================== */ /** ----------------------------------------------------------------------------------------- */ /** * Set an "error". * * @since 3.3 * @author Grégory Viguier * * @param string $message A message. * @param array $data Related data. */ protected function set_error( $message, $data = [] ) { $this->last_error = [ 'message' => $message, 'data' => (array) $data, ]; } /** * Get the last "error". * * @since 3.3 * @author Grégory Viguier * * @return array */ public function get_last_error() { return array_merge( [ 'message' => '', 'data' => [], ], (array) $this->last_error ); } }