/** */ public function create(Horde_Injector $injector) { $instance = $this->_binder->create($injector); try { $reflectionClass = new ReflectionClass(get_class($instance)); } catch (ReflectionException $e) { throw new Horde_Injector_Exception($e); } $setters = $this->_findAnnotatedSetters($reflectionClass); $this->_callSetters($setters, $injector, $instance); return $instance; }
/** * @param Horde_Injector_Binder $otherBinder * * @return boolean Equality. */ public function equals(Horde_Injector_Binder $otherBinder) { return $otherBinder instanceof Horde_Injector_Binder_Factory && $otherBinder->getFactory() == $this->_factory && $otherBinder->getMethod() == $this->_method; }
/** * @param Horde_Injector_Binder $otherBinder * * @return boolean Equality. */ public function equals(Horde_Injector_Binder $otherBinder) { return $otherBinder instanceof Horde_Injector_Binder_Closure && $otherBinder->getClosure() == $this->_closure; }
/** * @return boolean Equality. */ public function equals(Horde_Injector_Binder $otherBinder) { return $otherBinder instanceof Horde_Injector_Binder_Implementation && $otherBinder->getImplementation() == $this->_implementation; }
/** * @see self::addBinder() */ private function _addBinder($interface, Horde_Injector_Binder $binder) { // First we check to see if our parent already has an equal binder set. // if so we don't need to do anything if (!$binder->equals($this->_parentInjector->getBinder($interface))) { $this->_bindings[$interface] = $binder; } }