Automattic\WooCommerce\Admin\RemoteInboxNotifications\Transformers

DotNotation::transform()publicWC 1.0

Find given path from the given value.

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

Хуков нет.

Возвращает

Разное.

Использование

$DotNotation = new DotNotation();
$DotNotation->transform( $value, $arguments, $default );
$value(разное) (обязательный)
a value to transform.
$arguments(stdClass|null)
required argument 'path'.
По умолчанию: null
$default(строка|null)
default value.
По умолчанию: null

Код DotNotation::transform() WC 8.7.0

public function transform( $value, stdclass $arguments = null, $default = null ) {
	if ( is_object( $value ) ) {
		// if the value is an object, convert it to an array.
		$value = json_decode( wp_json_encode( $value ), true );
	}

	return $this->get( $value, $arguments->path, $default );
}