| 1 | <?php |
||
| 21 | trait MetaDataProviderTrait |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * The meta data array. |
||
| 25 | * |
||
| 26 | * @ODM\Field(type="hash") |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | private $metaData = []; |
||
| 30 | |||
| 31 | public function setMetaData($key, $value) |
||
| 37 | /** |
||
| 38 | * Get meta data. |
||
| 39 | * |
||
| 40 | * Returns the whole meta data array, if no <i>$key</i> is provided. |
||
| 41 | * Returns <i>$default</i>, if there is no meta data for the provided <i>$key</i>. |
||
| 42 | * |
||
| 43 | * @param null|string $key |
||
| 44 | * @param null|mixed $default |
||
| 45 | * |
||
| 46 | * @return array|mixed|null |
||
| 47 | */ |
||
| 48 | public function getMetaData($key = null, $default = null) |
||
| 56 | |||
| 57 | public function hasMetaData($key) |
||
| 61 | } |