Overview

Namespaces

  • Charcoal
    • Loader
    • Model
      • Service
      • ServiceProvider
    • Source
      • Database
    • Validator

Classes

  • AbstractMetadata
  • AbstractModel
  • Collection
  • Model
  • ModelMetadata
  • ModelValidator

Interfaces

  • CollectionInterface
  • DescribableInterface
  • MetadataInterface
  • ModelInterface

Traits

  • DescribableTrait
  • Overview
  • Namespace
  • Class

Class AbstractMetadata

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.

Charcoal\Config\AbstractConfig
Extended by Charcoal\Model\AbstractMetadata implements Charcoal\Model\MetadataInterface

Direct known subclasses

Charcoal\Model\ModelMetadata
Abstract
Namespace: Charcoal\Model
Located at Charcoal/Model/AbstractMetadata.php
Methods summary
public Charcoal\Model\MetadataInterface
# setDefaultData( array $defaultData )

Set the object's default values.

Set the object's default values.

Parameters

$defaultData
An associative array.

Returns

Charcoal\Model\MetadataInterface
Chainable

Implementation of

Charcoal\Model\MetadataInterface::setDefaultData()
public array
# defaultData( )

Retrieve the default values.

Retrieve the default values.

Returns

array

Implementation of

Charcoal\Model\MetadataInterface::defaultData()
public Charcoal\Model\MetadataInterface
# setProperties( array $properties )

Set the properties.

Set the properties.

Parameters

$properties
One or more properties.

Returns

Charcoal\Model\MetadataInterface
Chainable

Throws

InvalidArgumentException
If parameter is not an array.
public array
# properties( )

Retrieve the properties.

Retrieve the properties.

Returns

array

Implementation of

Charcoal\Model\MetadataInterface::properties()
public array|null
# property( string $propertyIdent )

Retrieve the given property.

Retrieve the given property.

Parameters

$propertyIdent
The property identifier.

Returns

array|null

Implementation of

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

Assign an instance of Charcoal\Property\PropertyInterface to the given property.

Assign an instance of Charcoal\Property\PropertyInterface to the given property.

Parameters

$propertyIdent
The property indentifer.
$propertyObject
The property, as an object.

Returns

Charcoal\Model\MetadataInterface
Chainable

Implementation of

Charcoal\Model\MetadataInterface::setPropertyObject()
public Charcoal\Property\PropertyInterface|null
# propertyObject( string $propertyIdent )

Retrieve the given property as an object.

Retrieve the given property as an object.

Parameters

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

Returns

Charcoal\Property\PropertyInterface|null

Implementation of

Charcoal\Model\MetadataInterface::propertyObject()
Properties summary
protected array $defaultData

Holds the default values of this configuration object.

Holds the default values of this configuration object.

# []
protected array $properties

Holds the properties of this configuration object.

Holds the properties of this configuration object.

# []
protected Charcoal\Property\PropertyInterface $propertiesObjects

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

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

#
API documentation generated by ApiGen