File "AttributeInterface.php"
Full Path: /home/warrior1/public_html/plugins/google-listings-and-ads/src/Product/Attributes/AttributeInterface.php
File size: 1.36 KB
MIME-type: text/x-php
Charset: utf-8
<?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\Product\Attributes;
use Automattic\WooCommerce\GoogleListingsAndAds\Admin\Product\Attributes\Input\AttributeInputInterface;
defined( 'ABSPATH' ) || exit;
/**
* Interface AttributeInterface
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\Product\Attributes
*/
interface AttributeInterface {
/**
* Returns the attribute ID.
*
* Must be the same as a Google product's property name to be set automatically.
*
* @return string
*
* @see \Google\Service\ShoppingContent\Product for the list of properties.
*/
public static function get_id(): string;
/**
* Return the attribute's value type. Must be a valid PHP type.
*
* @return string
*
* @link https://www.php.net/manual/en/function.settype.php
*/
public static function get_value_type(): string;
/**
* Return the attribute's input class. Must be an instance of `AttributeInputInterface`.
*
* @return string
*
* @see AttributeInputInterface
*
* @since 1.5.0
*/
public static function get_input_type(): string;
/**
* Return an array of WooCommerce product types that this attribute can be applied to.
*
* @return array
*/
public static function get_applicable_product_types(): array;
/**
* Returns the attribute value.
*
* @return mixed
*/
public function get_value();
}