2018-06-24 22:42:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repository;
|
|
|
|
|
|
|
|
use App\Entity\User;
|
|
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
2020-01-17 22:41:35 +00:00
|
|
|
use Doctrine\Persistence\ManagerRegistry;
|
2018-06-24 22:42:26 +00:00
|
|
|
|
|
|
|
class UserRepository extends ServiceEntityRepository
|
|
|
|
{
|
2020-01-17 22:41:35 +00:00
|
|
|
public function __construct(ManagerRegistry $registry)
|
2018-06-24 22:42:26 +00:00
|
|
|
{
|
|
|
|
parent::__construct($registry, User::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function add(User $user): void
|
|
|
|
{
|
|
|
|
$this->getEntityManager()->persist($user);
|
|
|
|
}
|
|
|
|
}
|