1: <?php
2:
3: namespace Charcoal\Model;
4:
5: /**
6: * Model Interface
7: */
8: interface ModelInterface
9: {
10: /**
11: * @param array $data The model data.
12: * @return ModelInterface Chainable
13: */
14: public function setData(array $data);
15:
16: /**
17: * @return array
18: */
19: public function data();
20:
21: /**
22: * @param array $data The odel flat data.
23: * @return ModelInterface Chainable
24: */
25: public function setFlatData(array $data);
26:
27: /**
28: * @return array
29: */
30: public function flatData();
31:
32: /**
33: * @return array
34: */
35: public function defaultData();
36:
37: /**
38: * @return array
39: */
40: public function properties();
41:
42: /**
43: * @param string $propertyIdent The property (ident) to get.
44: * @return PropertyInterface
45: */
46: public function property($propertyIdent);
47:
48: /**
49: * Alias of `properties()` (if not parameter is set) or `property()`.
50: *
51: * @param string $propertyIdent The property (ident) to get.
52: * @return mixed
53: */
54: public function p($propertyIdent = null);
55: }
56: