$metadataLoader
$metadataLoader : \Charcoal\Model\Service\MetadataLoader
Default implementation, as trait, of the `DescribableInterface`.
$metadataLoader : \Charcoal\Model\Service\MetadataLoader
$metadata : \Charcoal\Model\MetadataInterface
setData(array $data) : \Charcoal\Model\DescribableInterface
Describable object needs to have a `setData()` method
array | $data | The object's data. |
Chainable
setMetadataLoader(\Charcoal\Model\Service\MetadataLoader $loader) : \Charcoal\Model\DescribableInterface
\Charcoal\Model\Service\MetadataLoader | $loader | The loader instance, used to load metadata. |
Chainable
setMetadata(array|\Charcoal\Model\MetadataInterface $metadata) : \Charcoal\Model\DescribableInterface
array|\Charcoal\Model\MetadataInterface | $metadata | The object's metadata. |
If the parameter is not an array or MetadataInterface.
Chainable
metadata() : \Charcoal\Model\MetadataInterface
loadMetadata(string $metadataIdent = null) : \Charcoal\Model\MetadataInterface
Load a metadata file and store it as a static var.
Use a MetadataLoader
object and the object's metadataIdent
to load the metadata content (typically from the filesystem, as json).
string | $metadataIdent | Optional ident. |
setMetadataIdent(string $metadataIdent) : \Charcoal\Model\DescribableInterface
string | $metadataIdent | The metadata ident. |
Chainable
metadataLoader() : \Charcoal\Model\Service\MetadataLoader
Safe MetdataLoader getter. Create the loader if it does not exist.
If the metadata loader was not set.
createMetadata() : \Charcoal\Model\MetadataInterface