Value
in package
Tags
Table of Contents
- coerceInputValue() : array<string|int, mixed>
- Coerce the given value to match the given Automattic\WooCommerce\Vendor\GraphQL Input Type.
- add() : array<int, CoercionError>
- ofErrors() : array<string|int, mixed>
- ofValue() : array<string|int, mixed>
Methods
coerceInputValue()
Coerce the given value to match the given Automattic\WooCommerce\Vendor\GraphQL Input Type.
public
static coerceInputValue(mixed $value, InputType|Type $type[, array<string|int, mixed>|null $path = null ][, Schema|null $schema = null ]) : array<string|int, mixed>
Returns either a value which is valid for the provided type, or a list of encountered coercion errors.
Parameters
- $value : mixed
- $type : InputType|Type
- $path : array<string|int, mixed>|null = null
- $schema : Schema|null = null
Tags
Return values
array<string|int, mixed> —add()
private
static add(array<int, CoercionError> $errors, CoercionError|array<int, CoercionError> $errorOrErrors) : array<int, CoercionError>
Parameters
- $errors : array<int, CoercionError>
- $errorOrErrors : CoercionError|array<int, CoercionError>
Return values
array<int, CoercionError> —ofErrors()
private
static ofErrors(array<int, CoercionError> $errors) : array<string|int, mixed>
Parameters
- $errors : array<int, CoercionError>
Tags
Return values
array<string|int, mixed> —ofValue()
private
static ofValue(mixed $value) : array<string|int, mixed>
Parameters
- $value : mixed
-
any value
