| 1 | <?php |
||
| 24 | class InMemoryRepository extends Repository |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @var ArraySet |
||
| 28 | */ |
||
| 29 | protected $collection; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $entityName |
||
| 33 | */ |
||
| 34 | public function __construct($entityName) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | public function get(IdInterface $id) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | public function persist($element) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * {@inheritdoc} |
||
| 60 | */ |
||
| 61 | public function persistAll($elements) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc} |
||
| 70 | */ |
||
| 71 | public function remove($element) |
||
| 76 | } |
||
| 77 |