PHP Класс WC_Product_Attribute

Attributes can be global (taxonomy based) or local to the product itself. Uses ArrayAccess to be BW compatible with previous ways of reading attributes.
С версии: 2.7.0
Автор: WooThemes
Наследование: implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$data array Data array.

Открытые методы

Метод Описание
get_data ( ) : array Returns all data for this object.
get_id ( ) : integer Get the ID.
get_name ( ) : integer Get name.
get_options ( ) : array Get options.
get_position ( ) : integer Get position.
get_slugs ( ) : array Gets slugs from the stored options, or just the string if text based.
get_taxonomy ( ) : string Get taxonomy name if applicable.
get_taxonomy_object ( ) : array | null Get taxonomy object.
get_terms ( ) : array | null Gets terms from the stored options.
get_variation ( ) : boolean Get if variation.
get_visible ( ) : boolean Get if visible.
is_taxonomy ( ) : boolean Return if this attribute is a taxonomy.
offsetExists ( string $offset ) : boolean offsetExists
offsetGet ( string $offset ) : mixed offsetGet
offsetSet ( string $offset, mixed $value ) offsetSet
offsetUnset ( string $offset ) offsetUnset
set_id ( integer $value ) Set ID (this is the attribute ID).
set_name ( integer $value ) Set name (this is the attribute name or taxonomy).
set_options ( array $value ) Set options.
set_position ( integer $value ) Set position.
set_variation ( boolean $value ) Set if variation.
set_visible ( boolean $value ) Set if visible.

Описание методов

get_data() публичный Метод

Returns all data for this object.
public get_data ( ) : array
Результат array

get_id() публичный Метод

Get the ID.
public get_id ( ) : integer
Результат integer

get_name() публичный Метод

Get name.
public get_name ( ) : integer
Результат integer

get_options() публичный Метод

Get options.
public get_options ( ) : array
Результат array

get_position() публичный Метод

Get position.
public get_position ( ) : integer
Результат integer

get_slugs() публичный Метод

Gets slugs from the stored options, or just the string if text based.
public get_slugs ( ) : array
Результат array

get_taxonomy() публичный Метод

Get taxonomy name if applicable.
public get_taxonomy ( ) : string
Результат string

get_taxonomy_object() публичный Метод

Get taxonomy object.
public get_taxonomy_object ( ) : array | null
Результат array | null

get_terms() публичный Метод

Gets terms from the stored options.
public get_terms ( ) : array | null
Результат array | null

get_variation() публичный Метод

Get if variation.
public get_variation ( ) : boolean
Результат boolean

get_visible() публичный Метод

Get if visible.
public get_visible ( ) : boolean
Результат boolean

is_taxonomy() публичный Метод

Return if this attribute is a taxonomy.
public is_taxonomy ( ) : boolean
Результат boolean

offsetExists() публичный Метод

offsetExists
public offsetExists ( string $offset ) : boolean
$offset string
Результат boolean

offsetGet() публичный Метод

offsetGet
public offsetGet ( string $offset ) : mixed
$offset string
Результат mixed

offsetSet() публичный Метод

offsetSet
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed

offsetUnset() публичный Метод

offsetUnset
public offsetUnset ( string $offset )
$offset string

set_id() публичный Метод

Set ID (this is the attribute ID).
public set_id ( integer $value )
$value integer

set_name() публичный Метод

Set name (this is the attribute name or taxonomy).
public set_name ( integer $value )
$value integer

set_options() публичный Метод

Set options.
public set_options ( array $value )
$value array

set_position() публичный Метод

Set position.
public set_position ( integer $value )
$value integer

set_variation() публичный Метод

Set if variation.
public set_variation ( boolean $value )
$value boolean

set_visible() публичный Метод

Set if visible.
public set_visible ( boolean $value )
$value boolean

Описание свойств

$data защищенное свойство

Data array.
С версии: 2.7.0
protected array $data
Результат array