8946475dbac7901de4d18d73dc227910df09fd71
[yaffs-website] / vendor / doctrine / common / lib / Doctrine / Common / Persistence / ObjectManagerDecorator.php
1 <?php
2 /*
3  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14  *
15  * This software consists of voluntary contributions made by many individuals
16  * and is licensed under the MIT license. For more information, see
17  * <http://www.doctrine-project.org>.
18  */
19
20 namespace Doctrine\Common\Persistence;
21
22 /**
23  * Base class to simplify ObjectManager decorators
24  *
25  * @license http://opensource.org/licenses/MIT MIT
26  * @link    www.doctrine-project.org
27  * @since   2.4
28  * @author  Lars Strojny <lars@strojny.net>
29  */
30 abstract class ObjectManagerDecorator implements ObjectManager
31 {
32     /**
33      * @var ObjectManager
34      */
35     protected $wrapped;
36
37     /**
38      * {@inheritdoc}
39      */
40     public function find($className, $id)
41     {
42         return $this->wrapped->find($className, $id);
43     }
44
45     /**
46      * {@inheritdoc}
47      */
48     public function persist($object)
49     {
50         return $this->wrapped->persist($object);
51     }
52
53     /**
54      * {@inheritdoc}
55      */
56     public function remove($object)
57     {
58         return $this->wrapped->remove($object);
59     }
60
61     /**
62      * {@inheritdoc}
63      */
64     public function merge($object)
65     {
66         return $this->wrapped->merge($object);
67     }
68
69     /**
70      * {@inheritdoc}
71      */
72     public function clear($objectName = null)
73     {
74         return $this->wrapped->clear($objectName);
75     }
76
77     /**
78      * {@inheritdoc}
79      */
80     public function detach($object)
81     {
82         return $this->wrapped->detach($object);
83     }
84
85     /**
86      * {@inheritdoc}
87      */
88     public function refresh($object)
89     {
90         return $this->wrapped->refresh($object);
91     }
92
93     /**
94      * {@inheritdoc}
95      */
96     public function flush()
97     {
98         return $this->wrapped->flush();
99     }
100
101     /**
102      * {@inheritdoc}
103      */
104     public function getRepository($className)
105     {
106         return $this->wrapped->getRepository($className);
107     }
108
109     /**
110      * {@inheritdoc}
111      */
112     public function getClassMetadata($className)
113     {
114         return $this->wrapped->getClassMetadata($className);
115     }
116
117     /**
118      * {@inheritdoc}
119      */
120     public function getMetadataFactory()
121     {
122         return $this->wrapped->getMetadataFactory();
123     }
124
125     /**
126      * {@inheritdoc}
127      */
128     public function initializeObject($obj)
129     {
130         return $this->wrapped->initializeObject($obj);
131     }
132
133     /**
134      * {@inheritdoc}
135      */
136     public function contains($object)
137     {
138         return $this->wrapped->contains($object);
139     }
140 }