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 ResourceIdentifier

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\ResourceIdentifier

Direct known subclasses

Commercetools\Core\Model\Common\KeyReference, Commercetools\Core\Model\Common\KeyResourceIdentifier

Indirect known subclasses

Commercetools\Core\Model\Cart\CartReference, Commercetools\Core\Model\CartDiscount\CartDiscountReference, Commercetools\Core\Model\OrderEdit\OrderEditReference, Commercetools\Core\Model\Payment\PaymentReference, Commercetools\Core\Model\Product\ProductReference, Commercetools\Core\Model\ProductDiscount\ProductDiscountReference, Commercetools\Core\Model\ProductSelection\ProductSelectionReference, Commercetools\Core\Model\ProductType\ProductTypeReference, Commercetools\Core\Model\ShippingMethod\ShippingMethodReference, Commercetools\Core\Model\ShoppingList\ShoppingListReference, Commercetools\Core\Model\State\StateReference, Commercetools\Core\Model\Store\StoreReference, Commercetools\Core\Model\Category\CategoryReference, Commercetools\Core\Model\Subscription\SubscriptionReference, Commercetools\Core\Model\TaxCategory\TaxCategoryReference, Commercetools\Core\Model\Type\TypeReference, Commercetools\Core\Model\Zone\ZoneReference, Commercetools\Core\Model\Channel\ChannelReference, Commercetools\Core\Model\Common\Reference, Commercetools\Core\Model\Customer\CustomerReference, Commercetools\Core\Model\CustomerGroup\CustomerGroupReference, Commercetools\Core\Model\CustomObject\CustomObjectReference, Commercetools\Core\Model\DiscountCode\DiscountCodeReference, Commercetools\Core\Model\Order\OrderReference

Namespace: Commercetools\Core\Model\Common
API documentation: https://docs.commercetools.com/http-api-types.html#resourceidentifier
Located at Core/Model/Common/ResourceIdentifier.php

Methods summary

public static Commercetools\Core\Model\Common\ResourceIdentifier
# ofTypeAndId( $type, $id, Commercetools\Core\Model\Common\Context|callable $context = null )

Parameters

$type
$id
$context

Returns

Commercetools\Core\Model\Common\ResourceIdentifier
public static Commercetools\Core\Model\Common\ResourceIdentifier
# ofTypeAndKey( $type, $key, Commercetools\Core\Model\Common\Context|callable $context = null )

Parameters

$type
$key
$context

Returns

Commercetools\Core\Model\Common\ResourceIdentifier
public mixed
# jsonSerialize( )

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON

Returns

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

Link

http://php.net/manual/en/jsonserializable.jsonserialize.php

Overrides

Commercetools\Core\Model\Common\AbstractJsonDeserializeObject::jsonSerialize

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

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

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

__sleep(), fromArray(), 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
# getTypeId( )

Returns

string
public Commercetools\Core\Model\Common\ResourceIdentifier
# setTypeId( string $typeId = null )

Parameters

$typeId

Returns

Commercetools\Core\Model\Common\ResourceIdentifier
public string
# getId( )

Returns

string
public Commercetools\Core\Model\Common\ResourceIdentifier
# setId( string $id = null )

Parameters

$id

Returns

Commercetools\Core\Model\Common\ResourceIdentifier
public string
# getKey( )

Returns

string
public Commercetools\Core\Model\Common\ResourceIdentifier
# setKey( string $key = null )

Parameters

$key

Returns

Commercetools\Core\Model\Common\ResourceIdentifier

Constants summary

string TYPE_ID
# 'typeId'
string ID
# 'id'
string KEY
# 'key'

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