magnetico-web/src/Repository/UserRepository.php
2020-01-18 01:41:35 +03:00

20 lines
455 B
PHP

<?php
namespace App\Repository;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
class UserRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, User::class);
}
public function add(User $user): void
{
$this->getEntityManager()->persist($user);
}
}