| 1 | <?php |
||
| 8 | class EmailLink extends EntityRepository |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @param EmailLinkEntity $link |
||
| 12 | * @return EmailLinkEntity |
||
| 13 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 14 | */ |
||
| 15 | 4 | public function save(EmailLinkEntity $link) |
|
| 16 | { |
||
| 17 | 4 | $this->_em->persist($link); |
|
| 18 | 4 | $this->_em->flush(); |
|
| 19 | 4 | return $link; |
|
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param EmailLinkEntity $link |
||
| 24 | * @throws \Doctrine\ORM\OptimisticLockException |
||
| 25 | */ |
||
| 26 | 4 | public function delete(EmailLinkEntity $link) |
|
| 27 | { |
||
| 28 | 4 | $this->_em->remove($link); |
|
| 29 | 4 | $this->_em->flush(); |
|
| 30 | 4 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $token |
||
| 34 | * @return EmailLinkEntity|null |
||
| 35 | */ |
||
| 36 | 4 | public function findByToken($token) |
|
| 47 | } |
||
| 48 |