Automattic\WooCommerce\StoreApi\Schemas\V1
ShopperListItemSchema::__construct
Constructor.
Метод класса: ShopperListItemSchema{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ShopperListItemSchema = new ShopperListItemSchema(); $ShopperListItemSchema->__construct( $extend, $controller );
- $extend(ExtendSchema) (обязательный)
- Rest Extending instance.
- $controller(SchemaController) (обязательный)
- Schema Controller instance.
Код ShopperListItemSchema::__construct() ShopperListItemSchema:: construct WC 11.0.1
public function __construct( ExtendSchema $extend, SchemaController $controller ) {
parent::__construct( $extend, $controller );
$schema = $this->controller->get( ImageAttachmentSchema::IDENTIFIER );
if ( ! $schema instanceof ImageAttachmentSchema ) {
throw new \RuntimeException( 'ImageAttachmentSchema is not registered in SchemaController.' );
}
$this->image_attachment_schema = $schema;
}