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