/** * Registers the given dependencies with the parent class. * * @param string $parent_fqn The full namespaced class path. * @param array $dependencies The collection of dependencies. */ protected function registerDependencies($parent_fqn, array $dependencies) { foreach ($dependencies as $dependency) { $dependency_tree = $this->bindings[$dependency]; $this->container->when($parent_fqn)->needs($this->getFqn($dependency_tree['interface']))->give($this->getFqn($dependency_tree['concrete'])); } }
/** * @param string $class * @param string $compiledClass */ protected function resolveContextualBindings($class, $compiledClass) { foreach ($this->app->contextual[$class] as $abstract => $concrete) { $this->app->when($compiledClass)->needs($abstract)->give($concrete); } }