1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Doctrine\Persistence; |
6
|
|
|
|
7
|
|
|
use Doctrine\Persistence\Mapping\ClassMetadata; |
8
|
|
|
use Doctrine\Persistence\Mapping\ClassMetadataFactory; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Base class to simplify ObjectManager decorators |
12
|
|
|
*/ |
13
|
|
|
abstract class ObjectManagerDecorator implements ObjectManager |
14
|
|
|
{ |
15
|
|
|
/** @var ObjectManager */ |
16
|
|
|
protected $wrapped; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* {@inheritdoc} |
20
|
|
|
*/ |
21
|
1 |
|
public function find(string $className, $id) : ?object |
22
|
|
|
{ |
23
|
1 |
|
return $this->wrapped->find($className, $id); |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* {@inheritdoc} |
28
|
|
|
*/ |
29
|
1 |
|
public function persist(object $object) : void |
30
|
|
|
{ |
31
|
1 |
|
$this->wrapped->persist($object); |
32
|
1 |
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* {@inheritdoc} |
36
|
|
|
*/ |
37
|
1 |
|
public function remove(object $object) : void |
38
|
|
|
{ |
39
|
1 |
|
$this->wrapped->remove($object); |
40
|
1 |
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* {@inheritdoc} |
44
|
|
|
*/ |
45
|
1 |
|
public function merge(object $object) : object |
46
|
|
|
{ |
47
|
1 |
|
return $this->wrapped->merge($object); |
|
|
|
|
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* {@inheritdoc} |
52
|
|
|
*/ |
53
|
2 |
|
public function clear(?string $objectName = null) : void |
54
|
|
|
{ |
55
|
2 |
|
$this->wrapped->clear($objectName); |
56
|
2 |
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* {@inheritdoc} |
60
|
|
|
*/ |
61
|
1 |
|
public function detach(object $object) : void |
62
|
|
|
{ |
63
|
1 |
|
$this->wrapped->detach($object); |
|
|
|
|
64
|
1 |
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* {@inheritdoc} |
68
|
|
|
*/ |
69
|
1 |
|
public function refresh(object $object) : void |
70
|
|
|
{ |
71
|
1 |
|
$this->wrapped->refresh($object); |
72
|
1 |
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* {@inheritdoc} |
76
|
|
|
*/ |
77
|
1 |
|
public function flush() : void |
78
|
|
|
{ |
79
|
1 |
|
$this->wrapped->flush(); |
80
|
1 |
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* {@inheritdoc} |
84
|
|
|
*/ |
85
|
1 |
|
public function getRepository(string $className) : ObjectRepository |
86
|
|
|
{ |
87
|
1 |
|
return $this->wrapped->getRepository($className); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* {@inheritdoc} |
92
|
|
|
*/ |
93
|
1 |
|
public function getClassMetadata(string $className) : ClassMetadata |
94
|
|
|
{ |
95
|
1 |
|
return $this->wrapped->getClassMetadata($className); |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* {@inheritdoc} |
100
|
|
|
*/ |
101
|
1 |
|
public function getMetadataFactory() : ClassMetadataFactory |
102
|
|
|
{ |
103
|
1 |
|
return $this->wrapped->getMetadataFactory(); |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* {@inheritdoc} |
108
|
|
|
*/ |
109
|
1 |
|
public function initializeObject(object $obj) : void |
110
|
|
|
{ |
111
|
1 |
|
$this->wrapped->initializeObject($obj); |
112
|
1 |
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* {@inheritdoc} |
116
|
|
|
*/ |
117
|
1 |
|
public function contains(object $object) : bool |
118
|
|
|
{ |
119
|
1 |
|
return $this->wrapped->contains($object); |
120
|
|
|
} |
121
|
|
|
} |
122
|
|
|
|
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.