ReadingMode
class ReadingMode (View source)
Converter helpers for versioned args
Methods
public static
array|null
toDataQueryParams(string $mode)
Convert reading mode string to dataquery params.
public static
string|null
fromDataQueryParams(array $params)
Converts dataquery params to original reading mode.
public static
string|null
fromQueryString(array|string $query)
Convert querystring arguments to reading mode.
public static
array
toQueryString(string $mode)
Build querystring arguments for current reading mode.
public static
validateStage(string $stage)
Validate the stage is valid, throwing an exception if it's not
Details
static array|null
toDataQueryParams(string $mode)
Convert reading mode string to dataquery params.
Only supports stage / archive
static string|null
fromDataQueryParams(array $params)
Converts dataquery params to original reading mode.
Only supports stage / archive
static string|null
fromQueryString(array|string $query)
Convert querystring arguments to reading mode.
Only supports stage / archive mode
static array
toQueryString(string $mode)
Build querystring arguments for current reading mode.
Supports stage / archive only.
static
validateStage(string $stage)
Validate the stage is valid, throwing an exception if it's not