Function __global->read_abstract_sorting_params
Definitions
sources/content.php
- Clean up and verify URL sort parameters.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $_url_sort | string | No | No | required parameter | N/A | N/A | The URL sort string |
| $allowed_sorts | ?array | No | No | required parameter | N/A | N/A | List of allowed sort types (null: don't check) |
| $strict_error | boolean | No | No | True | N/A | N/A | Provide a hack-attack error on invalid input |
Returns
- A pair: The URL-style sort order, The URL-style sort direction
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Clean up and verify URL sort parameters.
*
* @param string $_url_sort The URL sort string
* @param ?array $allowed_sorts List of allowed sort types (null: don't check)
* @param boolean $strict_error Provide a hack-attack error on invalid input
* @return array A pair: The URL-style sort order, The URL-style sort direction
*/
function read_abstract_sorting_params(string $_url_sort, ?array $allowed_sorts, bool $strict_error = true) : array
* Clean up and verify URL sort parameters.
*
* @param string $_url_sort The URL sort string
* @param ?array $allowed_sorts List of allowed sort types (null: don't check)
* @param boolean $strict_error Provide a hack-attack error on invalid input
* @return array A pair: The URL-style sort order, The URL-style sort direction
*/
function read_abstract_sorting_params(string $_url_sort, ?array $allowed_sorts, bool $strict_error = true) : array

