-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathEntityManager.stub
72 lines (61 loc) · 1.71 KB
/
EntityManager.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
64
65
66
67
68
69
70
71
72
<?php
namespace Doctrine\ORM;
use Doctrine\ORM\Exception\ORMException;
class EntityManager 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
* @deprecated 2.7 This method is being removed from the ORM and won't have any replacement
*/
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
* @deprecated 2.7 This method is being removed from the ORM and won't have any replacement
*/
public function copy($entity, $deep = false);
/**
* @param object|object[]|null $entity
* @return void
*
* @throws ORMException
* @throws \Doctrine\DBAL\Exception\UniqueConstraintViolationException
*/
public function flush($entity = null);
}