\Charcoal\ModelAbstractMetadata

A basic metadata container.

Abstract implementation of \Charcoal\Model\MetadataInterface.

This class also implements the ArrayAccess, so properties can be accessed with []. The LoadableInterface is also implemented, mostly through LoadableTrait.

Summary

Methods
Properties
Constants
setDefaultData()
defaultData()
setProperties()
properties()
property()
setPropertyObject()
propertyObject()
No public properties found
No constants found
No protected methods found
$defaultData
$properties
$propertiesObjects
N/A
No private methods found
No private properties found
N/A

Properties

$defaultData

$defaultData : array

Holds the default values of this configuration object.

Type

array

$properties

$properties : array

Holds the properties of this configuration object.

Type

array

$propertiesObjects

$propertiesObjects : array<mixed,\Charcoal\Property\PropertyInterface>

Stores the properties, as objects, of this configuration object.

Type

array<mixed,\Charcoal\Property\PropertyInterface>

Methods

setDefaultData()

setDefaultData(array  $defaultData) : \Charcoal\Model\MetadataInterface

Set the object's default values.

Parameters

array $defaultData

An associative array.

Returns

\Charcoal\Model\MetadataInterface

Chainable

defaultData()

defaultData() : array

Retrieve the default values.

Returns

array

setProperties()

setProperties(array  $properties) : \Charcoal\Model\MetadataInterface

Set the properties.

Parameters

array $properties

One or more properties.

Throws

\Charcoal\Model\InvalidArgumentException

If parameter is not an array.

Returns

\Charcoal\Model\MetadataInterface

Chainable

properties()

properties() : array

Retrieve the properties.

Returns

array

property()

property(string  $propertyIdent) : array|null

Retrieve the given property.

Parameters

string $propertyIdent

The property identifier.

Returns

array|null

setPropertyObject()

setPropertyObject(string  $propertyIdent, \Charcoal\Property\PropertyInterface  $propertyObject) : \Charcoal\Model\MetadataInterface

Assign an instance of {@see PropertyInterface} to the given property.

Parameters

string $propertyIdent

The property indentifer.

\Charcoal\Property\PropertyInterface $propertyObject

The property, as an object.

Returns

\Charcoal\Model\MetadataInterface

Chainable

propertyObject()

propertyObject(string  $propertyIdent) : \Charcoal\Property\PropertyInterface|null

Retrieve the given property as an object.

Parameters

string $propertyIdent

The property (identifier) to return, as an object.

Returns

\Charcoal\Property\PropertyInterface|null