Automattic\WooCommerce\Admin\RemoteInboxNotifications\Transformers

ArrayKeys::transform()publicWC 1.0

Search array value by one of its key.

Method of the class: ArrayKeys{}

No Hooks.

Return

Mixed.

Usage

$ArrayKeys = new ArrayKeys();
$ArrayKeys->transform( $value, $arguments, $default );
$value(mixed) (required)
a value to transform.
$arguments(stdClass|null)
arguments.
Default: null
$default(string|null)
default value.
Default: array()

ArrayKeys::transform() code WC 8.7.0

public function transform( $value, stdClass $arguments = null, $default = array() ) {
	if ( ! is_array( $value ) ) {
		return $default;
	}

	return array_keys( $value );
}