From: Chuck Hagenbuch Date: Thu, 29 Apr 2010 14:59:05 +0000 (-0400) Subject: More declarative implementation X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=44a8d3278e485a0d8e7596504db7d8439acbf217;p=horde.git More declarative implementation --- diff --git a/framework/Injector/lib/Horde/Injector/Binder/ImplementationWithSetters.php b/framework/Injector/lib/Horde/Injector/Binder/ImplementationWithSetters.php index 2053bd905..5457877b7 100644 --- a/framework/Injector/lib/Horde/Injector/Binder/ImplementationWithSetters.php +++ b/framework/Injector/lib/Horde/Injector/Binder/ImplementationWithSetters.php @@ -17,15 +17,21 @@ class Horde_Injector_Binder_ImplementationWithSetters extends Horde_Injector_Bin $reflectionClass = new ReflectionClass($this->_implementation); $this->_validateImplementation($reflectionClass); $instance = $this->_getInstance($injector, $reflectionClass); - $setters = $this->_findSetters($reflectionClass); - foreach ($setters as $setter) { - $this->bindSetter($setter); - } + $this->_bindAnnotatedSetters($reflectionClass); $this->_callSetters($injector, $instance); return $instance; } /** + */ + private function _bindAnnotatedSetters(ReflectionClass $reflectionClass) + { + foreach ($this->_findSetters($reflectionClass) as $setter) { + $this->bindSetter($setter); + } + } + + /** * Find all public methods in $reflectionClass that are annotated with * @inject. *