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
파일 보기 프로젝트 열기: woocommerce/woocommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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