Automattic\WooCommerce\Admin\RemoteInboxNotifications\Transformers

ArrayFlatten::transform()publicWC 1.0

Search a given value in the array.

Метод класса: ArrayFlatten{}

No Hooks.

Return

Mixed|null.

Usage

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

Code of ArrayFlatten::transform() WC 7.1.0

public function transform( $value, stdClass $arguments = null, $default = null ) {
	$return = array();
	array_walk_recursive(
		$value,
		function( $item ) use ( &$return ) {
			$return[] = $item;
		}
	);

	return $return;
}