Total Complexity | 9 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | class Entity { |
||
5 | //Creates an object of type $className and populates it with data |
||
6 | |||
7 | private $className; |
||
8 | private $parent; |
||
9 | |||
10 | public function __construct(\Maphper\Maphper $parent, $className = null) { |
||
11 | $this->parent = $parent; |
||
12 | $this->className = $className; |
||
13 | } |
||
14 | |||
15 | public function create($data = [], $relations = [], $siblings = []) { |
||
20 | } |
||
21 | |||
22 | public function wrap($relations, $object, $siblings = []) { |
||
23 | //see if any relations need overwriting |
||
24 | foreach ($relations as $name => $relation) $this->addRelationData($object, $name, $relation, $siblings); |
||
25 | return $object; |
||
26 | } |
||
27 | |||
28 | private function addRelationData($object, $name, $relation, $siblings) { |
||
35 | } |
||
36 | } |
||
37 |