WooCommerce Code Reference

ArrayColumn implements TransformerInterface

Search array value by one of its key.

Interfaces, Classes and Traits

TransformerInterface
An interface to define a transformer.

Table of Contents

transform()  : mixed
Search array value by one of its key.
validate()  : mixed
Validate Transformer arguments.

Methods

transform()

Search array value by one of its key.

public transform(mixed $value[, stdClass|null $arguments = null ][, string|null $default_value = array() ]) : mixed
Parameters
$value : mixed

a value to transform.

$arguments : stdClass|null = null

required arguments 'key'.

$default_value : string|null = array()

default value.

Tags
throws
InvalidArgumentException

Throws when the required argument 'key' is missing.

Return values
mixed