class BaseModel implements ModelInterface (View source)

The base Klaviyo data model.

Methods

__construct(array $configuration = array())

The constructor of a Klaviyo data model.

__get($property)

PHPs magic get method to provide access to our protected attributes.

$this
__set($property, $value)

PHPs magic set method to provide access to our mutable attributes.

static KlaviyoModel
create(array $configuration = array())

Helper method to create the data model.

static KlaviyoModel
createFromJson(array $json = '')

Helper method to create the data model from a JSON array.

jsonSerialize()

{@inheritdoc}

toArray()

Convert the model to an array.

Details

at line line 26
__construct(array $configuration = array())

The constructor of a Klaviyo data model.

Parameters

array $configuration The key, value pair array to use for populating the data model.

at line line 37
__get($property)

PHPs magic get method to provide access to our protected attributes.

Parameters

$property

at line line 48
$this __set($property, $value)

PHPs magic set method to provide access to our mutable attributes.

Parameters

$property
$value

Return Value

$this

at line line 65
static KlaviyoModel create(array $configuration = array())

Helper method to create the data model.

Parameters

array $configuration The key, value pair array to use for populating the data model.

Return Value

KlaviyoModel An instance of the Klaviyo data model.

at line line 78
static KlaviyoModel createFromJson(array $json = '')

Helper method to create the data model from a JSON array.

Parameters

array $json The configuration json to use for populating the data model.

Return Value

KlaviyoModel An instance of the Klaviyo data model.

at line line 89
jsonSerialize()

{@inheritdoc}

at line line 98
toArray()

Convert the model to an array.