�PNG

   
IHDR   2   2   ?��   	pHYs     ��  
OiCCPPhotoshop ICC profile  xڝSgTS�=���BK���KoR RB���&*!	J�!��Q�EEȠ�����Q,�
��!���������{�kּ������>�����H3Q5��B�������.@�
$p �d!s�# �~<<+"�� x� �M��0���B�\���t�8K� @z�B� @F���&S � `�cb� P- `'�� ����{ [�!��  e�D h; ��V�E X0 fK�9 �- 0IWfH �� ���  0Q��) { `�##x �� F�W<�+��*  x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���  ������x����6��_-��"bb���ϫp@  �t~��,/��;�m��%�h^�u��f�@� ���W�p�~<<E���������J�B[a�W}�g�_�W�l�~<�����$�2]�G�����L�ϒ	�b��G�����"�Ib�X*�Qq�D���2�"�B�)�%��d��,�>�5 �j>{�-�]c�K'Xt���  �o��(�h���w��?�G�% �fI�q  ^D$.Tʳ?�  D��*�A��,�����`6�B$��BB
d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(��	A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;� 2����G1���Q=��C��7�F��dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8,	�c˱"����V����cϱw�E�	6wB aAHXLXN�H� $4�	7	�Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[
�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w
��ǈg(�gw��L�Ӌ�T071���oUX*�*|��
�J�&�*/T����ުU�U�T��^S}�FU3S�	Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k
��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN	�(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ
�M=:��.�k���Dw�n��^��Lo��y���}/�T�m���GX�$��<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��=
���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��?��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z�� ��%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~'���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl��������{�/�]py�����.,:�@L�N8��A*��%�w%�
y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L
Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y-
�B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�<qy�
�+�V�<���*m�O��W��~�&zMk�^�ʂ��k�U
�}����]OX/Yߵa���>������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n
�ڴ
�V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w-
6
U����#pDy���	��
:�v�{���vg/jB��F�S��[b[�O�>����z�G��4<YyJ�T�i��ӓg�ό���}~.��`ۢ�{�c��jo�t��E���;�;�\�t���W�W��:_m�t�<���Oǻ�����\k��z��{f���7����y���՞9=ݽ�zo������~r'��˻�w'O�_�@�A�C݇�?[�����j�w����G��������C���ˆ
��8>99�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-�    cHRM  z%  ��  ��  ��  u0  �`  :�  o�_�F  5IDATx��ytUս�?�;���fN$$��@B �!�k���	-*�gE���j�O�kQ�ʠ`U�B_� AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ	!�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_
_� #��k�MJ/=�9Du
*ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×�
B�����(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6���x��[l��RC��������nt@��;P��3���
F�w ��7��:�P���ɋ'���mj���Bƪ �$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+ f�E�!q��:����u����c��樼.UE�@��]K�W���$-�h]�JG���Dz)�`��.�A/
���mᏣc�3jK��!�>���$�Q� !�_�?\�C2(E
�M$Z	I{�U���s�ǣ���=��@Բe޻��W��� ��@�w����}�9v,)��.}*|"<kd�;�.!���:4uJ��1&�{(X����5C�G���>�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G	nߴ!����J�!��6(L�a)�� Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E��� ���xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل��
_.W���
!TU{�����,��"�� �;�������HI	S���))�o�1�H�D�
����(�	;��� �"Ҕ��,����
�F=���O��&�Ph>�`���y��߲&S��P�<��'��1s�1cĂ�N����2) ����@�u��tv��<�+�-&�����h��[!FSG���'
�	zz0��<����8d&�����E0�,�� <�� "!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08��
.q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y��
%Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB���	�x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉 !��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x
,�:�TW8�M`r���@��r+v�Q0��>^;˴�VbF��('�����	�*O��i��j�Ӆ����^�S3&�
���{������.ی��	N;��NU%d0�Ce\r"�C�b��&t7N�7���	�ȪD�[%l�۪�$��'m?�A9tI�9>��NVL	� ��		6v~M�����ъ�B���0<P�RM��$`������Mf����	���
T�9%]� �i(g�����W�ʣ�@'G�&�q�C�Q�x�H���`�̙��ԄC�'���a�����N��(
P�d���;�hZ,X������N
u�4�A��	�����S�Է֣�t8����:蠓�q�L.9L"��Q����8A{Q��w8�7ns�����s1���FȚFT�����9��߿O���n?�]����1f��om�Z��`�������%HA�Y�0m�Z��� x��dg���
!:�m
����h����L���t;y��}Af���O��~�]u/�[�@ ��˵���xCD�Z��y�<E7b"	c�@���
��$*�k����j��	u�d߰E�[�6R FX�s����,p|Y�e��*NW0����jc�Z�<ثi�����+H$���e&�A�`$�O  ˗��[ou����j��r�� (���iΨ�nt4���g�x�W�|ŋ�^�u^¹�����jϪ���~���\8R��}�����R�8(��A^f,��[�1/'�$!�������ӹ��B��s������s��G$.+,ڿ�����@�~ ?�s7Jz����s�9,�W7���c�5T���l�P���a!�` �vvPɋ��Ȕy6���Qv�:EuRR��3����'O^P��HՂ��$�Jd���HxR5�2}�t���X�g������?k/,A�����ɣc���A����#����̗Đ���D:h��������i�{��,�Ι����Ǎin��m��ǯg2�6����z�c�L*�fL��+�gD�<AOx��u�������2{�l���^�uou
@m,a]Ldp���@F�%� �t�|��n'��OX3q"�>����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D �&�^�	�����8	D֮�����o��k^z��O��hP�8q�5d*��YVq3�{���� ����#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k�
�xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�<y��lgFd~�'�R��<�S��P�g3�6�_��2����UQB
)TR�'L$DG_�;�T�0�܉�&7�4�px���J�.���=��d�d<���r/T5mt��_q���G��6�0�@"����`~_b�d ��d%��'y�?���
��\G+��mL�E2��a}�a�{%���	�٫���.>%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� 	���<A"yT��X���K9��N��������LE��@5�r�Mx�H1Z�g3t$3��\E:c��b%;y7u1�E3��K��Yz{��ɲlV�@ p��"�+ɢ�$F0�k�ńh�� >�H F#�_���,��]g����Ը����`RUU����
��"�qD���>-�� ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r
��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A�
4��f���/���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p �^���X,6��sV=�ܖ����6�3�X
���4ҿ��A2�&����_k�; d���VfO    IEND�B`�<?php
/**
 * REST API: WP_REST_Request class
 *
 * @package WordPress
 * @subpackage REST_API
 * @since 4.4.0
 */

/**
 * Core class used to implement a REST request object.
 *
 * Contains data from the request, to be passed to the callback.
 *
 * Note: This implements ArrayAccess, and acts as an array of parameters when
 * used in that manner. It does not use ArrayObject (as we cannot rely on SPL),
 * so be aware it may have non-array behavior in some cases.
 *
 * Note: When using features provided by ArrayAccess, be aware that WordPress deliberately
 * does not distinguish between arguments of the same name for different request methods.
 * For instance, in a request with `GET id=1` and `POST id=2`, `$request['id']` will equal
 * 2 (`POST`) not 1 (`GET`). For more precision between request methods, use
 * WP_REST_Request::get_body_params(), WP_REST_Request::get_url_params(), etc.
 *
 * @since 4.4.0
 *
 * @link https://www.php.net/manual/en/class.arrayaccess.php
 *
 * @phpstan-import-type Endpoint_Arg from WP_REST_Server
 *
 * @phpstan-type Attributes array{
 *     methods?: array<uppercase-string, true>,
 *     callback?: callable|null,
 *     permission_callback?: callable|null,
 *     validate_callback?: callable|null,
 *     args?: array<non-empty-string, Endpoint_Arg>,
 *     accept_json?: bool,
 *     accept_raw?: bool,
 *     show_in_index?: bool,
 *     allow_batch?: array{v1?: bool}|false,
 *     ...
 * }
 * @phpstan-type File_Param array{
 *     name: non-empty-string,
 *     type: string,
 *     size: non-negative-int,
 *     tmp_name: non-empty-string,
 *     error: 0,
 *     full_path?: non-empty-string,
 * }|array{
 *     name: string,
 *     type: string,
 *     size: non-negative-int,
 *     tmp_name: string,
 *     error: int<1, 8>,
 *     full_path?: string,
 * }|array{
 *     name: array<mixed>,
 *     type: array<mixed>,
 *     size: array<mixed>,
 *     tmp_name: array<mixed>,
 *     error: array<mixed>,
 *     full_path?: array<mixed>,
 * }
 * @phpstan-type Parameter_Type 'URL'|'GET'|'POST'|'FILES'|'JSON'|'defaults'
 * @phpstan-type Params array{
 *     URL: array<string, mixed>,
 *     GET: array<mixed>,
 *     POST: array<mixed>,
 *     FILES: array<string, File_Param>,
 *     JSON: array<mixed>|string|int|float|bool|null,
 *     defaults: array<string, mixed>,
 * }
 *
 * @phpstan-implements ArrayAccess<string, mixed>
 */
#[AllowDynamicProperties]
class WP_REST_Request implements ArrayAccess {

	/**
	 * HTTP method.
	 *
	 * @since 4.4.0
	 * @var string
	 * @phpstan-var uppercase-string
	 */
	protected $method = '';

	/**
	 * Parameters passed to the request.
	 *
	 * These typically come from the `$_GET`, `$_POST` and `$_FILES`
	 * superglobals when being created from the global scope.
	 *
	 * @since 4.4.0
	 * @var array<string, mixed> Contains GET, POST and FILES keys mapping to arrays of data.
	 * @phpstan-var Params
	 */
	protected $params;

	/**
	 * HTTP headers for the request.
	 *
	 * @since 4.4.0
	 * @var array<string, string[]> Map of key to list of values. Key is always lowercase, as per HTTP specification.
	 * @phpstan-var array<lowercase-string, string[]>
	 */
	protected $headers = array();

	/**
	 * Body data.
	 *
	 * @since 4.4.0
	 * @var string|null Binary data from the request, or null if no body has been set.
	 */
	protected $body = null;

	/**
	 * Route matched for the request.
	 *
	 * @since 4.4.0
	 * @var string
	 */
	protected $route;

	/**
	 * Attributes (options) for the route that was matched.
	 *
	 * This is the options array used when the route was registered, typically
	 * containing the callback as well as the valid methods for the route.
	 *
	 * @since 4.4.0
	 * @var array<string, mixed> Attributes for the request.
	 * @phpstan-var Attributes
	 */
	protected $attributes = array();

	/**
	 * Used to determine if the JSON data has been parsed yet.
	 *
	 * Allows lazy-parsing of JSON data where possible.
	 *
	 * @since 4.4.0
	 * @var bool
	 */
	protected $parsed_json = false;

	/**
	 * Used to determine if the body data has been parsed yet.
	 *
	 * @since 4.4.0
	 * @var bool
	 */
	protected $parsed_body = false;

	/**
	 * Constructor.
	 *
	 * @since 4.4.0
	 *
	 * @param string               $method     Optional. Request method. Default empty.
	 * @param string               $route      Optional. Request route. Default empty.
	 * @param array<string, mixed> $attributes Optional. Request attributes. Default empty array.
	 *
	 * @phpstan-param Attributes $attributes
	 */
	public function __construct( $method = '', $route = '', $attributes = array() ) {
		$this->params = array(
			'URL'      => array(),
			'GET'      => array(),
			'POST'     => array(),
			'FILES'    => array(),

			// See parse_json_params.
			'JSON'     => null,

			'defaults' => array(),
		);

		$this->set_method( $method );
		$this->set_route( $route );
		$this->set_attributes( $attributes );
	}

	/**
	 * Retrieves the HTTP method for the request.
	 *
	 * @since 4.4.0
	 *
	 * @return string HTTP method.
	 *
	 * @phpstan-return uppercase-string
	 */
	public function get_method() {
		return $this->method;
	}

	/**
	 * Sets HTTP method for the request.
	 *
	 * @since 4.4.0
	 *
	 * @param string $method HTTP method.
	 */
	public function set_method( $method ) {
		$this->method = strtoupper( $method );
	}

	/**
	 * Retrieves all headers from the request.
	 *
	 * @since 4.4.0
	 *
	 * @return array<string, string[]> Map of key to list of values. Key is always lowercase, as per HTTP specification.
	 *
	 * @phpstan-return array<lowercase-string, string[]>
	 */
	public function get_headers() {
		return $this->headers;
	}

	/**
	 * Determines if the request is the given method.
	 *
	 * @since 6.8.0
	 *
	 * @param string $method HTTP method.
	 * @return bool Whether the request is of the given method.
	 */
	public function is_method( $method ) {
		return $this->get_method() === strtoupper( $method );
	}

	/**
	 * Canonicalizes the header name.
	 *
	 * Ensures that header names are always treated the same regardless of
	 * source. Header names are always case-insensitive.
	 *
	 * Note that we treat `-` (dashes) and `_` (underscores) as the same
	 * character, as per header parsing rules in both Apache and nginx.
	 *
	 * @link https://stackoverflow.com/q/18185366
	 * @link https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers
	 * @link https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
	 *
	 * @since 4.4.0
	 *
	 * @param string $key Header name.
	 * @return string Canonicalized name.
	 *
	 * @phpstan-return lowercase-string
	 */
	public static function canonicalize_header_name( $key ) {
		$key = strtolower( $key );
		$key = str_replace( '-', '_', $key );

		return $key;
	}

	/**
	 * Retrieves the given header from the request.
	 *
	 * If the header has multiple values, they will be concatenated with a comma
	 * as per the HTTP specification. Be aware that some non-compliant headers
	 * (notably cookie headers) cannot be joined this way.
	 *
	 * @since 4.4.0
	 *
	 * @param string $key Header name, will be canonicalized to lowercase.
	 * @return string|null String value if set, null otherwise.
	 */
	public function get_header( $key ) {
		$key = static::canonicalize_header_name( $key );

		if ( ! isset( $this->headers[ $key ] ) ) {
			return null;
		}

		return implode( ',', $this->headers[ $key ] );
	}

	/**
	 * Retrieves header values from the request.
	 *
	 * @since 4.4.0
	 *
	 * @param string $key Header name, will be canonicalized to lowercase.
	 * @return string[]|null List of string values if set, null otherwise.
	 */
	public function get_header_as_array( $key ) {
		$key = static::canonicalize_header_name( $key );

		if ( ! isset( $this->headers[ $key ] ) ) {
			return null;
		}

		return $this->headers[ $key ];
	}

	/**
	 * Sets the header on request.
	 *
	 * @since 4.4.0
	 *
	 * @param string          $key   Header name.
	 * @param string|string[] $value Header value, or list of values.
	 */
	public function set_header( $key, $value ) {
		$key   = static::canonicalize_header_name( $key );
		$value = (array) $value;

		$this->headers[ $key ] = $value;
	}

	/**
	 * Appends a header value for the given header.
	 *
	 * @since 4.4.0
	 *
	 * @param string          $key   Header name.
	 * @param string|string[] $value Header value, or list of values.
	 */
	public function add_header( $key, $value ) {
		$key   = static::canonicalize_header_name( $key );
		$value = (array) $value;

		if ( ! isset( $this->headers[ $key ] ) ) {
			$this->headers[ $key ] = array();
		}

		$this->headers[ $key ] = array_merge( $this->headers[ $key ], $value );
	}

	/**
	 * Removes all values for a header.
	 *
	 * @since 4.4.0
	 *
	 * @param string $key Header name.
	 */
	public function remove_header( $key ) {
		$key = static::canonicalize_header_name( $key );
		unset( $this->headers[ $key ] );
	}

	/**
	 * Sets headers on the request.
	 *
	 * @since 4.4.0
	 *
	 * @param array<string, string|string[]> $headers  Map of header name to value, or list of values.
	 * @param bool                           $override If true, replace the request's headers. Otherwise, merge with existing.
	 */
	public function set_headers( $headers, $override = true ) {
		if ( true === $override ) {
			$this->headers = array();
		}

		foreach ( $headers as $key => $value ) {
			$this->set_header( $key, $value );
		}
	}

	/**
	 * Retrieves the Content-Type of the request.
	 *
	 * @since 4.4.0
	 *
	 * @return array|null {
	 *     The parsed Content-Type header, or null when no valid Content-Type
	 *     header was available.
	 *
	 *     @type string $value      Media type, lowercased, such as `application/json`.
	 *     @type string $type       Top-level type, such as `application`.
	 *     @type string $subtype    Subtype, such as `json`.
	 *     @type string $parameters Parameters following the media type, such as
	 *                              `charset=UTF-8`. Empty string if none.
	 * }
	 */
	public function get_content_type() {
		$value = $this->get_header( 'Content-Type' );
		if ( empty( $value ) ) {
			return null;
		}

		$parameters = '';
		if ( strpos( $value, ';' ) ) {
			list( $value, $parameters ) = explode( ';', $value, 2 );
		}

		$value = strtolower( $value );
		if ( ! str_contains( $value, '/' ) ) {
			return null;
		}

		// Parse type and subtype out.
		list( $type, $subtype ) = explode( '/', $value, 2 );

		$data = compact( 'value', 'type', 'subtype', 'parameters' );
		$data = array_map( 'trim', $data );

		return $data;
	}

	/**
	 * Checks if the request has specified a JSON Content-Type.
	 *
	 * @since 5.6.0
	 *
	 * @return bool True if the Content-Type header is JSON.
	 */
	public function is_json_content_type() {
		$content_type = $this->get_content_type();

		return isset( $content_type['value'] ) && wp_is_json_media_type( $content_type['value'] );
	}

	/**
	 * Retrieves the parameter priority order.
	 *
	 * Used when checking parameters in WP_REST_Request::get_param().
	 *
	 * @since 4.4.0
	 *
	 * @return string[] Array of types to check, in order of priority.
	 *
	 * @phpstan-return list<Parameter_Type>
	 */
	protected function get_parameter_order() {
		$order = array();

		if ( $this->is_json_content_type() ) {
			$order[] = 'JSON';
		}

		$this->parse_json_params();

		// Ensure we parse the body data.
		$body = $this->get_body();

		if ( 'POST' !== $this->method && ! empty( $body ) ) {
			$this->parse_body_params();
		}

		$accepts_body_data = array( 'POST', 'PUT', 'PATCH', 'DELETE' );
		if ( in_array( $this->method, $accepts_body_data, true ) ) {
			$order[] = 'POST';
		}

		$order[] = 'GET';
		$order[] = 'URL';
		$order[] = 'defaults';

		/**
		 * Filters the parameter priority order for a REST API request.
		 *
		 * The order affects which parameters are checked when using WP_REST_Request::get_param()
		 * and family. This acts similarly to PHP's `request_order` setting.
		 *
		 * @since 4.4.0
		 *
		 * @param string[]        $order   Array of types to check, in order of priority.
		 * @param WP_REST_Request $request The request object.
		 *
		 * @phpstan-param list<Parameter_Type> $order
		 */
		return apply_filters( 'rest_request_parameter_order', $order, $this );
	}

	/**
	 * Retrieves a parameter from the request.
	 *
	 * @since 4.4.0
	 *
	 * @param string $key Parameter name.
	 * @return mixed|null Value if set, null otherwise.
	 */
	public function get_param( $key ) {
		$order = $this->get_parameter_order();

		foreach ( $order as $type ) {
			// Determine if we have the parameter for this type.
			if ( isset( $this->params[ $type ][ $key ] ) ) {
				return $this->params[ $type ][ $key ];
			}
		}

		return null;
	}

	/**
	 * Checks if a parameter exists in the request.
	 *
	 * This allows distinguishing between an omitted parameter,
	 * and a parameter specifically set to null.
	 *
	 * @since 5.3.0
	 *
	 * @param string $key Parameter name.
	 * @return bool True if a param exists for the given key.
	 */
	public function has_param( $key ) {
		$order = $this->get_parameter_order();

		foreach ( $order as $type ) {
			if ( is_array( $this->params[ $type ] ) && array_key_exists( $key, $this->params[ $type ] ) ) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Sets a parameter on the request.
	 *
	 * If the given parameter key exists in any parameter type an update will take place,
	 * otherwise a new param will be created in the first parameter type (respecting
	 * get_parameter_order()).
	 *
	 * @since 4.4.0
	 *
	 * @param string $key   Parameter name.
	 * @param mixed  $value Parameter value.
	 */
	public function set_param( $key, $value ) {
		$order     = $this->get_parameter_order();
		$found_key = false;

		foreach ( $order as $type ) {
			if ( 'defaults' !== $type && is_array( $this->params[ $type ] ) && array_key_exists( $key, $this->params[ $type ] ) ) {
				$this->params[ $type ][ $key ] = $value;
				$found_key                     = true;
			}
		}

		if ( ! $found_key ) {
			$this->params[ $order[0] ][ $key ] = $value;
		}
	}

	/**
	 * Retrieves merged parameters from the request.
	 *
	 * The equivalent of get_param(), but returns all parameters for the request.
	 * Handles merging all the available values into a single array.
	 *
	 * @since 4.4.0
	 *
	 * @return array<mixed> Map of key to value.
	 */
	public function get_params() {
		$order = $this->get_parameter_order();
		$order = array_reverse( $order, true );

		$params = array();
		foreach ( $order as $type ) {
			/*
			 * array_merge() / the "+" operator will mess up
			 * numeric keys, so instead do a manual foreach.
			 */
			foreach ( (array) $this->params[ $type ] as $key => $value ) {
				$params[ $key ] = $value;
			}
		}

		// Exclude rest_route if pretty permalinks are not enabled.
		if ( ! get_option( 'permalink_structure' ) ) {
			unset( $params['rest_route'] );
		}

		return $params;
	}

	/**
	 * Retrieves parameters from the route itself.
	 *
	 * These are parsed from the URL using the regex.
	 *
	 * @since 4.4.0
	 *
	 * @return array<string, mixed> Parameter map of key to value.
	 */
	public function get_url_params() {
		return $this->params['URL'];
	}

	/**
	 * Sets parameters from the route.
	 *
	 * Typically, this is set after parsing the URL.
	 *
	 * @since 4.4.0
	 *
	 * @param array<string, mixed> $params Parameter map of key to value.
	 */
	public function set_url_params( $params ) {
		$this->params['URL'] = $params;
	}

	/**
	 * Retrieves parameters from the query string.
	 *
	 * These are the parameters you'd typically find in `$_GET`.
	 *
	 * @since 4.4.0
	 *
	 * @return array<mixed> Parameter map of key to value.
	 */
	public function get_query_params() {
		return $this->params['GET'];
	}

	/**
	 * Sets parameters from the query string.
	 *
	 * Typically, this is set from `$_GET`.
	 *
	 * @since 4.4.0
	 *
	 * @param array<mixed> $params Parameter map of key to value.
	 */
	public function set_query_params( $params ) {
		$this->params['GET'] = $params;
	}

	/**
	 * Retrieves parameters from the body.
	 *
	 * These are the parameters you'd typically find in `$_POST`.
	 *
	 * @since 4.4.0
	 *
	 * @return array<mixed> Parameter map of key to value.
	 */
	public function get_body_params() {
		return $this->params['POST'];
	}

	/**
	 * Sets parameters from the body.
	 *
	 * Typically, this is set from `$_POST`.
	 *
	 * @since 4.4.0
	 *
	 * @param array<mixed> $params Parameter map of key to value.
	 */
	public function set_body_params( 