Author: Bob Mckee (bmckee@bywires.com)
Author: James Pepin (james@jamespepin.com)
Author: Chuck Hagenbuch (chuck@horde.org)
Beispiel #1
0
 /**
  */
 protected function _getInstance(Horde_Injector $injector, ReflectionClass $class)
 {
     return $class->getConstructor() ? $class->newInstanceArgs($this->_dependencyFinder->getMethodDependencies($injector, $class->getConstructor())) : $class->newInstance();
 }
Beispiel #2
0
 /**
  * Call each ReflectionMethod in the $setters array, filling in its
  * dependencies with the $injector.
  *
  * @param array $setters            Array of ReflectionMethods to call.
  * @param Horde_Injector $injector  The injector to get dependencies from.
  * @param object $instance          The object to call setters on.
  */
 private function _callSetters(array $setters, Horde_Injector $injector, $instance)
 {
     foreach ($setters as $setterMethod) {
         $setterMethod->invokeArgs($instance, $this->_dependencyFinder->getMethodDependencies($injector, $setterMethod));
     }
 }