Composable Commerce PHP SDKPHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • Commercetools
    • Commons
      • Helper
    • Core
      • Builder
        • Request
        • Update
      • Cache
      • Client
        • Adapter
        • OAuth
      • Error
      • Helper
        • Annotate
        • State
          • Renderer
        • Subscriber
          • Log
      • Model
        • ApiClient
        • Cart
        • CartDiscount
        • Category
        • Channel
        • Common
        • Customer
        • CustomerGroup
        • CustomField
        • CustomObject
        • DiscountCode
        • Extension
        • Inventory
        • Message
        • Order
        • OrderEdit
        • Payment
        • Product
          • Search
        • ProductDiscount
        • ProductSelection
        • ProductType
        • Project
        • Review
        • ShippingMethod
        • ShoppingList
        • State
        • Store
        • Subscription
        • TaxCategory
        • Type
        • Zone
      • Request
        • ApiClients
        • CartDiscounts
          • Command
        • Carts
          • Command
        • Categories
          • Command
        • Channels
          • Command
        • CustomerGroups
          • Command
        • Customers
          • Command
        • CustomField
          • Command
        • CustomObjects
        • DiscountCodes
          • Command
        • Extensions
          • Command
        • GraphQL
        • InStores
        • Inventory
          • Command
        • Me
          • Command
        • Messages
        • OrderEdits
          • Command
          • StagedOrder
            • Command
        • Orders
          • Command
        • Payments
          • Command
        • ProductDiscounts
          • Command
        • Products
          • Command
        • ProductSelections
          • Command
        • ProductTypes
          • Command
        • Project
          • Command
        • Query
        • Reviews
          • Command
        • ShippingMethods
          • Command
        • ShoppingLists
          • Command
        • States
          • Command
        • Stores
          • Command
        • Subscriptions
          • Command
        • TaxCategories
          • Command
        • Types
          • Command
        • Zones
          • Command
      • Response

Classes

  • AbstractJsonDeserializeObject
  • Address
  • AddressCollection
  • Asset
  • AssetCollection
  • AssetDimension
  • AssetDraft
  • AssetDraftCollection
  • AssetSource
  • AssetSourceCollection
  • Attribute
  • AttributeCollection
  • CentPrecisionMoney
  • ClientLogging
  • Collection
  • ContainerAndKey
  • Context
  • CreatedBy
  • DateDecorator
  • DateTimeDecorator
  • DiscountedPrice
  • DiscountValue
  • Enum
  • EnumCollection
  • GeoLocation
  • GeoPoint
  • HighPrecisionMoney
  • Image
  • ImageCollection
  • ImageDimension
  • JsonObject
  • KeyReference
  • KeyResourceIdentifier
  • LastModifiedBy
  • LocalizedEnum
  • LocalizedEnumCollection
  • LocalizedString
  • Money
  • MoneyCollection
  • Price
  • PriceCollection
  • PriceDraft
  • PriceDraftCollection
  • PriceTier
  • PriceTierCollection
  • Reference
  • ReferenceCollection
  • Resource
  • ResourceIdentifier
  • ScopedPrice
  • Set
  • TaxedItemPrice
  • TaxedPrice
  • TaxPortion
  • TaxPortionCollection
  • TimeDecorator

Interfaces

  • ContextAwareInterface
  • JsonDeserializeInterface
  • ObjectTreeInterface
  • ReferenceObjectInterface
  • TypeableInterface

Traits

  • ContextTrait
  • LocaleTrait
  • ObjectTreeTrait

Class Attribute

Commercetools\Core\Model\Common\AbstractJsonDeserializeObject implements Commercetools\Core\Model\Common\JsonDeserializeInterface, Commercetools\Core\Model\Common\ObjectTreeInterface uses Commercetools\Core\Model\Common\ObjectTreeTrait
Extended by Commercetools\Core\Model\Common\JsonObject implements JsonSerializable uses Commercetools\Core\Model\Common\ContextTrait
Extended by Commercetools\Core\Model\Common\Attribute
Namespace: Commercetools\Core\Model\Common
API documentation: https://docs.commercetools.com/http-api-projects-products.html#attribute
Located at Core/Model/Common/Attribute.php

Methods summary

public Commercetools\Core\Model\Common\Attribute
# setAttributeDefinition( Commercetools\Core\Model\ProductType\AttributeDefinition $definition )

Parameters

$definition

Returns

Commercetools\Core\Model\Common\Attribute
$this
public boolean
# getValueAsBool( )

Returns

boolean
public integer|float
# getValueAsNumber( )

Returns

integer|float
public string
# getValueAsString( )

Returns

string
public Commercetools\Core\Model\Common\LocalizedString
# getValueAsLocalizedString( )

Returns

Commercetools\Core\Model\Common\LocalizedString
public Commercetools\Core\Model\Common\LocalizedEnum
# getValueAsLocalizedEnum( )

Returns

Commercetools\Core\Model\Common\LocalizedEnum
public Commercetools\Core\Model\Common\Enum
# getValueAsEnum( )

Returns

Commercetools\Core\Model\Common\Enum
public Commercetools\Core\Model\Common\Money
# getValueAsMoney( )

Returns

Commercetools\Core\Model\Common\Money
public Commercetools\Core\Model\Common\DateDecorator
# getValueAsDate( )

Returns

Commercetools\Core\Model\Common\DateDecorator
public Commercetools\Core\Model\Common\TimeDecorator
# getValueAsTime( )

Returns

Commercetools\Core\Model\Common\TimeDecorator
public Commercetools\Core\Model\Common\DateTimeDecorator
# getValueAsDateTime( )

Returns

Commercetools\Core\Model\Common\DateTimeDecorator
public Commercetools\Core\Model\Common\AttributeCollection
# getValueAsNested( )

Returns

Commercetools\Core\Model\Common\AttributeCollection
public Commercetools\Core\Model\Common\Reference
# getValueAsReference( )

Returns

Commercetools\Core\Model\Common\Reference
public Commercetools\Core\Model\Common\Set
# getValueAsBoolSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsNumberSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsStringSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsLocalizedStringSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsLocalizedEnumSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsEnumSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsMoneySet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsDateSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsTimeSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsDateTimeSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsNestedSet( )

Returns

Commercetools\Core\Model\Common\Set
public Commercetools\Core\Model\Common\Set
# getValueAsReferenceSet( )

Returns

Commercetools\Core\Model\Common\Set

Methods inherited from Commercetools\Core\Model\Common\JsonObject

__construct(), __get(), hasField(), isOptional()

Methods inherited from Commercetools\Core\Model\Common\AbstractJsonDeserializeObject

__sleep(), fromArray(), jsonSerialize(), of(), toArray()

Methods inherited from Commercetools\Core\Model\Common\ContextAwareInterface

getContext(), getContextCallback(), setContext(), setContextIfNull()

Methods inherited from Commercetools\Core\Model\Common\ObjectTreeInterface

parentSet(), rootGet(), rootSet()

Methods used from Commercetools\Core\Model\Common\ContextTrait

getContext(), getContextCallback(), setContext(), setContextIfNull()

Methods used from Commercetools\Core\Model\Common\ObjectTreeTrait

parentSet(), rootGet(), rootSet()

Magic methods summary

public string
# getName( )

Returns

string
public Commercetools\Core\Model\Common\Attribute
# setName( string $name = null )

Parameters

$name

Returns

Commercetools\Core\Model\Common\Attribute
public mixed
# getValue( )

Returns

mixed
public Commercetools\Core\Model\Common\Attribute
# setValue( $value = null )

Parameters

$value

Returns

Commercetools\Core\Model\Common\Attribute

Constants summary

string T_UNKNOWN
# 'unknown'
string PROP_VALUE
# "value"
string PROP_KEY
# "key"
string PROP_NAME
# "name"
string PROP_CURRENCY_CODE
# "currencyCode"
string PROP_CENT_AMOUNT
# "centAmount"
string PROP_TYPE_ID
# "typeId"
string PROP_ID
# "id"
string PROP_LABEL
# "label"
string API_BOOL
# 'boolean'
string API_NUMBER
# 'number'
string API_TEXT
# 'text'
string API_LTEXT
# 'ltext'
string API_LENUM
# 'lenum'
string API_ENUM
# 'enum'
string API_MONEY
# 'money'
string API_DATE
# 'date'
string API_TIME
# 'time'
string API_DATETIME
# 'datetime'
string API_SET
# 'set'
string API_NESTED
# 'nested'
string API_REFERENCE
# 'reference'

Constants inherited from Commercetools\Core\Model\Common\JsonObject

DECORATOR, ELEMENT_TYPE, INITIALIZED, OPTIONAL, TYPE

Constants inherited from Commercetools\Core\Model\Common\AbstractJsonDeserializeObject

JSON_DESERIALIZE_INTERFACE, TYPEABLE_INTERFACE

PHP SDK API documentation generated by ApiGen