20 lines
462 B
PHP
20 lines
462 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Repository;
|
||
|
|
||
|
use App\Entity\User;
|
||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||
|
use Symfony\Bridge\Doctrine\RegistryInterface;
|
||
|
|
||
|
class UserRepository extends ServiceEntityRepository
|
||
|
{
|
||
|
public function __construct(RegistryInterface $registry)
|
||
|
{
|
||
|
parent::__construct($registry, User::class);
|
||
|
}
|
||
|
|
||
|
public function add(User $user): void
|
||
|
{
|
||
|
$this->getEntityManager()->persist($user);
|
||
|
}
|
||
|
}
|