class Stack

Stack Class to initialize the provided parameter Stack

Properties

$header

Methods

__construct(string $api_key = '', string $delivery_token = '', string $environment = '', $config = array('region' => '', 'branch' => '', 'live_preview' => array()))

Constructor of the Stack

ContentType(string $contentTypeId = '')

To initialize the ContentType object from where the content will be fetched/retrieved.

Assets(string $assetUid = '')

Assets Class to initalize your Assets

string
ImageTrasform($url, $parameters)

ImageTrasform function is define for image manipulation with different

LivePreviewQuery($parameters)

No description

getLastActivities()

To get the last_activity information of the configured environment from all the content types

setHost(string $host = '')

To set the host on stack object

string
getHost()

This function returns host.

setProtocol(string $protocol = '')

This function sets protocol.

string
getProtocol()

This function return protocol type.

setPort(string $port = '')

This function sets Port.

string
getPort()

This function return Port.

setAPIKEY(string $api_key = '')

This function sets API Key.

setDeliveryToken(string $delivery_token = '')

This function sets Delivery Token.

setEnvironment(string $environment = '')

This function sets environment name.

string
getAPIKEY()

This function returns API Key.

string
DeliveryToken()

This function returns Delivery Token.

string
getEnvironment()

This function returns environment name.

setBranch(string $branch = '')

This function sets Branch.

string
Branch()

This function returns Branch.

getContentTypes(object $params)

This call returns comprehensive information of all the content types available in a particular stack in your account.

sync(object $params)

Syncs your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates

Details

at line 54
__construct(string $api_key = '', string $delivery_token = '', string $environment = '', $config = array('region' => '', 'branch' => '', 'live_preview' => array()))

Constructor of the Stack

Parameters

string $api_key
  • API Key of Stack
string $delivery_token
  • Delivery Token of Stack
string $environment
  • Environment Name of Stack
$config

at line 93
ContentType ContentType(string $contentTypeId = '')

To initialize the ContentType object from where the content will be fetched/retrieved.

Parameters

string $contentTypeId
  • valid content type uid relevant to configured stack

Return Value

ContentType

at line 106
Assets Assets(string $assetUid = '')

Assets Class to initalize your Assets

Parameters

string $assetUid
  • valid asset uid relevent to configured stack

Return Value

Assets

at line 122
string ImageTrasform($url, $parameters)

ImageTrasform function is define for image manipulation with different

Parameters

$url

: Image url on which we want to manipulate.

$parameters

: It is an second parameter in which we want to place different manipulation key and value in array form

Return Value

string

at line 147
LivePreviewQuery($parameters)

No description

Parameters

$parameters

at line 163
Result getLastActivities()

To get the last_activity information of the configured environment from all the content types

Return Value

Result

at line 176
Stack setHost(string $host = '')

To set the host on stack object

Parameters

string $host
  • host name/ipaddress from where the content to be fetched

Return Value

Stack

at line 187
string getHost()

This function returns host.

Return Value

string

at line 198
Stack setProtocol(string $protocol = '')

This function sets protocol.

Parameters

string $protocol
  • protocol type

Return Value

Stack

at line 209
string getProtocol()

This function return protocol type.

Return Value

string

at line 220
Stack setPort(string $port = '')

This function sets Port.

Parameters

string $port
  • Port Number

Return Value

Stack

at line 232
string getPort()

This function return Port.

Return Value

string

at line 244
Stack setAPIKEY(string $api_key = '')

This function sets API Key.

Parameters

string $api_key
  • API Key

Return Value

Stack

at line 257
Stack setDeliveryToken(string $delivery_token = '')

This function sets Delivery Token.

Parameters

string $delivery_token
  • Delivery Token

Return Value

Stack

at line 271
Stack setEnvironment(string $environment = '')

This function sets environment name.

Parameters

string $environment
  • Name of Environment

Return Value

Stack

at line 283
string getAPIKEY()

This function returns API Key.

Return Value

string

at line 292
string DeliveryToken()

This function returns Delivery Token.

Return Value

string

at line 301
string getEnvironment()

This function returns environment name.

Return Value

string

at line 313
Stack setBranch(string $branch = '')

This function sets Branch.

Parameters

string $branch
  • Name of branch

Return Value

Stack

at line 325
string Branch()

This function returns Branch.

Return Value

string

at line 338
Stack getContentTypes(object $params)

This call returns comprehensive information of all the content types available in a particular stack in your account.

Parameters

object $params
  • query params for getting content-type.

Return Value

Stack

at line 355
Stack sync(object $params)

Syncs your Contentstack data with your app and ensures that the data is always up-to-date by providing delta updates

Parameters

object $params
  • params is an object that supports ‘locale’, ‘start_date’, ‘content_type_uid’, and ‘type’ queries.

Return Value

Stack