| 1 | <?php |
||
| 26 | final class DataPersister implements DataPersisterInterface |
||
| 27 | { |
||
| 28 | use ClassInfoTrait; |
||
| 29 | |||
| 30 | private $managerRegistry; |
||
| 31 | |||
| 32 | public function __construct(ManagerRegistry $managerRegistry) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | public function supports($data): bool |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function persist($data) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * {@inheritdoc} |
||
| 60 | */ |
||
| 61 | public function remove($data) |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Gets the Doctrine object manager associated with given data. |
||
| 73 | * |
||
| 74 | * @param mixed $data |
||
| 75 | * |
||
| 76 | * @return DoctrineObjectManager|null |
||
| 77 | */ |
||
| 78 | private function getManager($data) |
||
| 82 | } |
||
| 83 |