Automattic\WooCommerce\Admin\RemoteInboxNotifications

TransformerInterface{}interfaceWC 1.0

Deprecated since 9.4.0. It is no longer supported and may be removed in future releases. Use \Automattic\WooCommerce\Admin\RemoteSpecs\Transformers\TransformerInterface instead.

An interface to define a transformer.

Interface TransformerInterface

No Hooks.

Usage

$TransformerInterface = new TransformerInterface();
// use class methods

Methods

  1. public transform( $value, ?stdClass $arguments = null, $default_value = null )
  2. public validate( ?stdClass $arguments = null )
  3. ERROR: no method name found on line `*`
  4. ERROR: no method name found on line `/**`

Notes

  • Package: Automattic\WooCommerce\Admin\RemoteInboxNotifications

Changelog

Deprecated since 9.4.0 Use \Automattic\WooCommerce\Admin\RemoteSpecs\Transformers\TransformerInterface instead.

TransformerInterface{} code WC 10.8.1

interface TransformerInterface {
	/**
	 * Transform given value to a different value.
	 *
	 * @param mixed         $value a value to transform.
	 * @param stdClass|null $arguments arguments.
	 * @param string|null   $default_value default value.
	 *
	 * @return mixed|null
	 */
	public function transform( $value, ?stdClass $arguments = null, $default_value = null );

	/**
	 * Validate Transformer arguments.
	 *
	 * @param stdClass|null $arguments arguments to validate.
	 *
	 * @return mixed
	 */
	public function validate( ?stdClass $arguments = null );
}