1 | <?php |
||
13 | trait InMemoryLoaderTrait |
||
14 | { |
||
15 | use LazyLoaderTrait; |
||
16 | |||
17 | /** |
||
18 | * @var EntityCollection |
||
19 | */ |
||
20 | protected $entityCollection; |
||
21 | |||
22 | /** |
||
23 | * @var MajoraNormalizer |
||
24 | */ |
||
25 | protected $normalizer; |
||
26 | |||
27 | /** |
||
28 | * Construct. |
||
29 | * |
||
30 | * @param string $collectionClass |
||
31 | * @param MajoraNormalizer $normalizer |
||
32 | */ |
||
33 | public function __construct($collectionClass, MajoraNormalizer $normalizer) |
||
37 | |||
38 | /** |
||
39 | * Substitue to __construct() in order to easier call from parent class. |
||
40 | * |
||
41 | * @param string $collectionClass |
||
42 | * @param MajoraNormalizer $normalizer |
||
43 | */ |
||
44 | private function setUp($collectionClass, MajoraNormalizer $normalizer) |
||
62 | |||
63 | /** |
||
64 | * Register given set of data into datastore. |
||
65 | * |
||
66 | * @param array $entityData |
||
67 | */ |
||
68 | public function registerData(array $entityData) |
||
77 | |||
78 | /** |
||
79 | * Register a new Collectionable entity into datastore. |
||
80 | * |
||
81 | * @param CollectionableInterface $entity |
||
82 | * |
||
83 | * @throws \InvalidArgumentException If given object is not a supported type |
||
84 | */ |
||
85 | public function registerEntity(CollectionableInterface $entity) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | * |
||
104 | * @see LoaderInterface::retrieveAll() |
||
105 | */ |
||
106 | public function retrieveAll(array $filters = array(), $limit = null, $offset = null) |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | * |
||
125 | * @see LoaderInterface::retrieveOne() |
||
126 | */ |
||
127 | public function retrieveOne(array $filters = array()) |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | * |
||
135 | * @see LoaderInterface::retrieve() |
||
136 | */ |
||
137 | public function retrieve($id) |
||
141 | } |
||
142 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.