-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathEntityManagerDecorator.stub
63 lines (53 loc) · 1.39 KB
/
EntityManagerDecorator.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Doctrine\ORM\Decorator;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Exception\ORMException;
class EntityManagerDecorator implements EntityManagerInterface
{
/**
* @template T of object
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $id
* @phpstan-param integer|null $lockMode
* @phpstan-param integer|null $lockVersion
* @phpstan-return T|null
*/
public function find($entityName, $id, $lockMode = null, $lockVersion = null);
/**
* @template T of object
* @phpstan-param T $entity
* @phpstan-return T
*/
public function merge($entity);
/**
* @template T of object
* @phpstan-param class-string<T> $entityName
* @phpstan-return EntityRepository<T>
*/
public function getRepository($entityName);
/**
* @template T of object
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $id
* @phpstan-return T|null
*
* @throws ORMException
*/
public function getReference($entityName, $id);
/**
* @template T of object
* @phpstan-param class-string<T> $entityName
* @phpstan-param mixed $identifier
*
* @phpstan-return T|null
*/
public function getPartialReference($entityName, $identifier);
/**
* @template T of object
* @phpstan-param T $entity
* @phpstan-param bool $deep
* @phpstan-return T
*/
public function copy($entity, $deep = false);
}