Class Product
Represents a single element in a result having the products format.
-
Apptus\ESales\Connector\Product
implements
IteratorAggregate
Methods summary
public
Apptus\ESales\Connector\Attribute |null
|
#
getAttribute( name $name )
Get the attribute with the specified name or null if no such attribute exists for this product.
Get the attribute with the specified name or null if no such attribute exists for this product.
Parameters
- $name
- name of the attribute to get.
Returns
|
public
string
|
#
key( )
Return the key of this product.
Return the key of this product.
Returns
string The key of this product.
|
public
string|mixed
|
#
getValue( string $attributeName, mixed $defaultValue = null )
Get the value of the attribute with the specified $attributeName. The specified $defaultValue
will be returned if no such attribute exists (defaults to null).
Get the value of the attribute with the specified $attributeName. The specified $defaultValue
will be returned if no such attribute exists (defaults to null).
Parameters
- $attributeName
- name of the attribute whose value to retrieve.
- $defaultValue
- value to return if this product does not have an attribute with the specified $attributeName, defaults to null.
Returns
string|mixed The attribute value of attribute with the specified $attributeName, or the supplied $defaultValue
if this product has no attribute matching the name.
|
public
|
|
public
string
|
#
getTicket( )
Get the notification ticket of this product.
Get the notification ticket of this product.
Returns
string The ticket.
|
public
array
|
#
getCategoryReferenceAttributes( )
Get the available category reference attributes in the product.
Get the available category reference attributes in the product.
Returns
array the available category reference attributes in the product as an array
|
public
array
|
#
getCategories( string $categoryReferenceAttribute )
Get the Category objects of the given category reference attribute.
Get the Category objects of the given category reference attribute.
Parameters
- $categoryReferenceAttribute
- the category reference attribute to get the categories for
Returns
array the Category objects of the categoryReferenceAttribute as an array
|
public
Apptus\ESales\Connector\Variant[]
|
#
getVariants( )
Get the an array with variants of this product.
Get the an array with variants of this product.
Returns
|
public
|
|