WooCommerce Code Reference

OperationParams
in package

Structure representing parsed HTTP parameters for Automattic\WooCommerce\Vendor\GraphQL operation.

The properties in this class are not strictly typed, as this class is only meant to serve as an intermediary representation which is not yet validated.

Table of Contents

$extensions  : mixed
Reserved for implementors to extend the protocol however they see fit.
$operation  : mixed
The name of the operation in the document to execute.
$originalInput  : array<string|int, mixed>
The raw params used to construct this instance.
$query  : mixed
A document containing Automattic\WooCommerce\Vendor\GraphQL operations and fragments to execute.
$queryId  : mixed
Id of the query (when using persisted queries).
$readOnly  : bool
Executed in read-only context (e.g. via HTTP GET request)?
$variables  : mixed
Values for any variables defined by the operation.
create()  : OperationParams
Creates an instance from given array.
decodeIfJSON()  : mixed
Decodes the value if it is JSON, otherwise returns it unchanged.

Properties

Methods

decodeIfJSON()

Decodes the value if it is JSON, otherwise returns it unchanged.

protected static decodeIfJSON(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed