private function processInstance($compiler) { if (is_object($compiler)) { return $compiler; } elseif (class_exists($compiler)) { return $this->container->getInstance($compiler); } throw Exception::neitherObjectOrClass($compiler); }
private function getBinder() { $class = $this->context->hasCache() ? CachedBinder::class : Binder::class; return $this->container->getInstance($class); }
/** * @test * @expectedException InvalidArgumentException */ public function getInstance_failComplexDependencyLoop() { $this->target->getInstance(DummyLoopComplex::class); }