1 | <?php |
||
34 | class ObjectManagerWrapper implements ObjectManagerInterface |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The object manager instance to be wrapped. |
||
39 | * |
||
40 | * @var \AppserverIo\Psr\Di\ObjectManagerInterface |
||
41 | */ |
||
42 | protected $objectManager; |
||
43 | |||
44 | /** |
||
45 | * Injects the passed object manager instance into this wrapper. |
||
46 | * |
||
47 | * @param \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager The object manager instance used for initialization |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | public function injectObjectManager(ObjectManagerInterface $objectManager) |
||
55 | |||
56 | /** |
||
57 | * Return's the object manager instance. |
||
58 | * |
||
59 | * @return \AppserverIo\Psr\Di\ObjectManagerInterface The object manager instance |
||
60 | */ |
||
61 | public function getObjectManager() |
||
65 | |||
66 | /** |
||
67 | * Adds the passed object descriptor to the object manager. If the merge flag is TRUE, then |
||
68 | * we check if already an object descriptor for the class exists before they will be merged. |
||
69 | * |
||
70 | * When we merge object descriptors this means, that the values of the passed descriptor |
||
71 | * will override the existing ones. |
||
72 | * |
||
73 | * @param \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor The object descriptor to add |
||
74 | * @param boolean $merge TRUE if we want to merge with an existing object descriptor |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public function addObjectDescriptor(DescriptorInterface $objectDescriptor, $merge = false) |
||
82 | |||
83 | /** |
||
84 | * Returns the object descriptor if we've registered it. |
||
85 | * |
||
86 | * @param string $className The class name we want to return the object descriptor for |
||
87 | * |
||
88 | * @return \AppserverIo\Psr\Deployment\DescriptorInterface|null The requested object descriptor instance |
||
89 | * @throws \AppserverIo\Psr\Di\UnknownObjectDescriptorException Is thrown if someone tries to access an unknown object desciptor |
||
90 | */ |
||
91 | public function getObjectDescriptor($className) |
||
95 | |||
96 | /** |
||
97 | * Returns the storage with the object descriptors. |
||
98 | * |
||
99 | * @return \AppserverIo\Storage\StorageInterface The storage with the object descriptors |
||
100 | */ |
||
101 | public function getObjectDescriptors() |
||
105 | |||
106 | /** |
||
107 | * Query if we've an object descriptor for the passed class name. |
||
108 | * |
||
109 | * @param string $className The class name we query for a object descriptor |
||
110 | * |
||
111 | * @return boolean TRUE if an object descriptor has been registered, else FALSE |
||
112 | */ |
||
113 | public function hasObjectDescriptor($className) |
||
117 | |||
118 | /** |
||
119 | * Registers the passed object descriptor under its class name. |
||
120 | * |
||
121 | * @param \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor The object descriptor to set |
||
122 | * |
||
123 | * @return void |
||
124 | */ |
||
125 | public function setObjectDescriptor(DescriptorInterface $objectDescriptor) |
||
129 | |||
130 | /** |
||
131 | * Adds the passed object descriptor to the object manager. If the merge flag is TRUE, then |
||
132 | * we check if already an object descriptor for the class exists before they will be merged. |
||
133 | * |
||
134 | * When we merge object descriptors this means, that the values of the passed descriptor |
||
135 | * will override the existing ones. |
||
136 | * |
||
137 | * @param \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor The object descriptor to add |
||
138 | * @param boolean $merge TRUE if we want to merge with an existing object descriptor |
||
139 | * |
||
140 | * @return void |
||
141 | */ |
||
142 | public function addPreference(DescriptorInterface $objectDescriptor, $merge = false) |
||
146 | |||
147 | /** |
||
148 | * Return's the preference for the passed class name. |
||
149 | * |
||
150 | * @param string $className The class name to return the preference for |
||
151 | * |
||
152 | * @return string The preference or the original class name |
||
153 | */ |
||
154 | public function getPreference($className) |
||
158 | } |
||
159 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.