1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\Data;
14:
15: /**
16: * Class AbstractModel.
17: * Abstract base class for data provider models.
18: * This class implements the setter and getter for meta data.
19: *
20: * @package DcGeneral\Data
21: */
22: abstract class AbstractModel implements ModelInterface
23: {
24: /**
25: * A list with all meta information.
26: *
27: * @var array
28: */
29: protected $arrMetaInformation = array();
30:
31: /**
32: * {@inheritdoc}
33: */
34: public function getMeta($strMetaName)
35: {
36: if (isset($this->arrMetaInformation[$strMetaName]))
37: {
38: return $this->arrMetaInformation[$strMetaName];
39: }
40:
41: return null;
42: }
43:
44: /**
45: * {@inheritdoc}
46: */
47: public function setMeta($strMetaName, $varValue)
48: {
49: $this->arrMetaInformation[$strMetaName] = $varValue;
50: }
51: }
52: