Instantiate all dependencies.

@param $file
@param $parser
@param $resolver
768652
protected function instantiate($file, $parser, $resolver)
    {
        $this->instantiateClass($file, 'file', File::class);

        $this->instantiateClass($parser, 'parser', Parser::class);

        $this->instantiateClass($resolver, 'resolver', Resolver::class);
    }
208221
public static function extractDependencies($file)
    {
        $manifest = @include $file;
        return isset($manifest['requires']) && is_array($manifest['requires'])
            ? array_keys($manifest['requires'])
            : (isset($manifest['dependencies']) && is_array($manifest['dependencies'])
                ? $manifest['dependencies']
                : array()
        );
        
    }
546379
public function configureOptionsResolver(OptionsResolver $resolver)
    {
        parent::configureOptionsResolver($resolver);

        $resolver->setRequired([
            self::OPTION_SERVICE,
            self::OPTION_METHOD,
        ]);

        $resolver->setAllowedTypes(self::OPTION_SERVICE, ['string']);
        $resolver->setAllowedTypes(self::OPTION_METHOD, ['string']);
    }
1279986
public function addResolver(EmailPartResolver $resolver, $part): self
    {
        $this->resolvers[$part] = $resolver;

        return $this;
    }
1199101
public function registerTemplateEngine($resolver)
    {
        $app = $this->app;

        // The Compiler engine requires an instance of the CompilerInterface, which in
        // this case will be the Template compiler, so we'll first create the compiler
        // instance to pass into the engine so it can compile the views properly.
        $app->bindShared('template.compiler', function($app)
        {
            $cachePath = $app['config']['view.compiled'];

            return new TemplateCompiler($app['files'], $cachePath);
        });

        $resolver->register('template', function() use ($app)
        {
            return new CompilerEngine($app['template.compiler'], $app['files']);
        });
    }
927257
protected function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);
        $resolver->setDefaults(
            [
                'allow_reset' => false,   // Allow the reader to reset it's iterator
                'log_count' => false,   // Log in state history the result count
                'empty_log_level' => LogLevel::WARNING,
            ]
        );
        $resolver->setAllowedValues(
            'empty_log_level',
            [
                LogLevel::ALERT,
                LogLevel::CRITICAL,
                LogLevel::DEBUG,
                LogLevel::EMERGENCY,
                LogLevel::ERROR,
                LogLevel::INFO,
                LogLevel::NOTICE,
                LogLevel::WARNING,
            ]
        );
    }
700713
public void loadLibrary(Resolver resolver, Node base, Node descriptor, Node properties) throws IOException {
        Source source;
        Module module;
        Library library;
        File file;

        addReload(descriptor);
        source = Source.load(properties, base);
        library = (Library) Library.TYPE.loadXml(descriptor).get();
        autoFiles(resolver, library, source);
        for (net.oneandone.jasmin.descriptor.Module descriptorModule : library.modules()) {
            module = new Module(descriptorModule.getName(), source);
            notLinked.put(module, descriptorModule.dependencies());
            for (Resource resource : descriptorModule.resources()) {
                file = resolver.resolve(source.classpathBase, resource);
                addReload(file);
                resolver.resolve(source.classpathBase, resource);
                module.files().add(file);
            }
            add(module);
        }
    }
1278553
public function attach(EntryNameResolverInterface $resolver, $priority = self::DEFAULT_PRIORITY)
    {
        $this->resolvers->insert(
            [
                'instance' => $resolver,

            ],
            $priority
        );

        return $this;
    }
1080398
protected function loadLayoutUpdate($file)
    {
        $update = $this->loader->load($file);
        if ($update) {
            $el = $update instanceof ElementDependentLayoutUpdateInterface
                ? $update->getElement()
                : 'root';
            $this->updates[$el][] = $update;

            $this->dependencyInitializer->initialize($update);
        }
    }
959907
function resolve($class, \Closure $__resolve_compatible = null)
    {
        return parent::resolve($class, function($class, $resource, $match) {
            if (false === $fileIncludeClass = \Poirot\Loader\funcWatchFileExists($class, $resource, $match, '.php'))
                return false;

            ## require file so class can be accessible (AutoLoading Goes Work)
            require_once $fileIncludeClass;
            return $fileIncludeClass;
        });
    }
468130
public function registerBladeEngine($resolver)
    {
        // The Compiler engine requires an instance of the CompilerInterface, which in
        // this case will be the Blade compiler, so we'll first create the compiler
        // instance to pass into the engine so it can compile the views properly.
        $this->plugin->singleton('blade.compiler', function () {
            return new BladeCompiler(
                $this->plugin['files'], $this->plugin['config']['view.compiled']
            );
        });

        $resolver->register('blade', function () {
            return new CompilerEngine($this->plugin['blade.compiler']);
        });
    }
291075
public function scan($file)
    {
        // If no decision is already made about this file
        if (!isset($this->states[$file])) {
            $this->display(' -> Scanning '.$file.'...');
            $this->states[$file] = self::NO_PARSE;
            $entry = $this->metas->get($file);
            $rst = $this->getRST($file);

            if (!$entry || !file_exists($rst) || $entry['ctime'] < filectime($rst)) {
                // File was never seen or changed and thus need to be parsed
                $this->addToParseQueue($file);
            } else {
                // Have a look to the file dependencies to knoww if you need to parse
                // it or not
                $depends = $entry['depends'];

                if (isset($entry['parent'])) {
                    $depends[] = $entry['parent'];
                }

                foreach ($depends as $dependency) {
                    $this->scan($dependency);

                    // If any dependency needs to be parsed, this file needs also to be
                    // parsed
                    if ($this->states[$dependency] == self::PARSE) {
                        $this->addToParseQueue($file);
                    }
                }
            }
        }
    }
105595
public function addFormFieldResolver(FormFieldResolverInterface $resolver, $priority = 0)
    {
        $this->formFieldResolvers[$priority][] = $resolver;
        $this->needsSorting = true;
    }
439104
function Resolver(options)
	{
		if (!(this instanceof Resolver))
			return new Resolver(options);

		Logger.mixin(this, options);

		options = this.options = setProperties({}, this.options, options);

		this._cache = {};
		this._manifestCache = {};

		this._core = {};
		this._extensions = new PriorityList();
		this._manifests = new PriorityList();
		this._prefixes = new PriorityList(function(a, b)
		{
			return a.value === b.value;
		});

		this._group("Resolver Initialize", null, function()
		{
			this._initGet();
			this._initRoot();
			this._initCore();
			this._initExtension();
			this._initPrefix();
			this._initManifest();

			this._initAllowExtensionless(options.allowExtensionless);
		});
	}
934577
private static function _isResolved(array $dependenciesList, array $resolved)
    {
        foreach($dependenciesList as $dependency) {
            if ( ! array_key_exists($dependency, $resolved)) {
                return false;
            }
        }
        return true;
    }
1283529
public function create(string $file) : ModularParser
    {
        $clone = clone $this;
        $clone->valid = null;
        $clone->file = false;
        $clone->class = null;
        return $clone->setFileToLoad($file);
    }
1157717
def register_dependency_resolver(scheme, &block)
      self.config = hash_reassoc(config, :dependency_resolvers) do |hash|
        hash.merge(scheme => block)
      end
    end