Automattic\WooCommerce\Blocks\Registry

FactoryType{}WC 2.5.0

Definition for the FactoryType dependency type.

Хуков нет.

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

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

Методы

  1. public get( Container $container )

Список изменений

С версии 2.5.0 Введена.

Код FactoryType{} WC 8.7.0

class FactoryType extends AbstractDependencyType {
	/**
	 * Invokes and returns the value from the stored internal callback.
	 *
	 * @param Container $container  An instance of the dependency injection
	 *                              container.
	 *
	 * @return mixed
	 */
	public function get( Container $container ) {
		return $this->resolve_value( $container );
	}
}