getMethodDependencies() public method

public getMethodDependencies ( Horde_Injector $injector, ReflectionMethod $method ) : array
$injector Horde_Injector
$method ReflectionMethod
return array
Example #1
0
 /**
  */
 protected function _getInstance(Horde_Injector $injector, ReflectionClass $class)
 {
     return $class->getConstructor() ? $class->newInstanceArgs($this->_dependencyFinder->getMethodDependencies($injector, $class->getConstructor())) : $class->newInstance();
 }
Example #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));
     }
 }