{@inheritDoc}

@todo complete with dependencies
511497
public function collect(MvcEvent $mvcEvent)
    {
        $this->collectedServices        = $this->logger->getLoggedServices();
        $this->collectedServiceLocators = $this->logger->getLoggedServiceLocators();
    }
557072
private function validateDependencies(array $fixtures, FixtureInterface $fixture) : void
    {
        if (! $fixture instanceof DependentFixtureInterface) {
            return;
        }

        $dependenciesClasses = $fixture->getDependencies();

        foreach ($dependenciesClasses as $class) {
            if (! array_key_exists($class, $fixtures)) {
                throw new RuntimeException(sprintf('Fixture "%s" was declared as a dependency for fixture "%s", but it was not included in any of the loaded fixture groups.', $class, get_class($fixture)));
            }
        }
    }
378256
public function mergeDependencies($dependency = [])
    {
        $this->dependencies = array_merge((array) $dependency, (array) $this->getDependencies());
        $this->dependencies = Conversion::arrayObject($this->dependencies);
    }
1007918
protected function getDependencies()
    {
        if (null === $this->dependencies) {
            if (file_exists(sprintf('%s/dependencies.json', $this->paths->getThemeConfigDir()))) {
                $depsContent = file_get_contents(sprintf('%s/dependencies.json', $this->paths->getThemeConfigDir()));
            } else {
                $depsContent = file_get_contents(sprintf('%s/dependencies.json', $this->paths->getBaseConfigDir()));
            }
            $this->dependencies = json_decode($depsContent, true);
        }

        return $this->dependencies;
    }
1301346
public function getDependencies(array $parameters)
    {
    	$dependencies = array();

        foreach ($parameters as $parameter) {

            try {

                $dependency = $parameter->getClass();

            } catch (ReflectionException $e) {

                throw new ResolveException('Target <' . $parameter . '> could not be found.', $e->getCode(), $e);

            }

            if (is_null($dependency)) {
                // It 's a string or the like
                $dependencies[] = $this->resolveArgument($parameter);

            } else {

                $dependencies[] = $this->resolveClass($parameter);

            }
        }

        return (array) $dependencies;
    }
681766
function Dependencies(module, dependencies) {
        "use strict";
    
        var modules = {};
        Object.defineProperty(this, 'modules', {
            'get': function () {
                return modules;
            }
        });
    
        this.set = function (value) {
    
            if (dependencies) {
                console.error('Module dependencies can only be set once')
                return;
            }
            dependencies = value;
            load();
    
        };
    
        var ready;
        Object.defineProperty(this, 'loaded', {
            'get': function () {
                return !!ready;
            }
        });
    
        var callbacks = [];
    
        function done() {
    
            ready = true;
            for (var i in callbacks) {
                callbacks[i](modules);
            }
            callbacks = [];
    
        }
    
        this.done = function (callback) {
    
            if (ready) {
                callback(modules);
                return;
            }
            callbacks.push(callback);
    
        };
    
        var coordinate = new Coordinate(
            'controls',
            'require',
            'react',
            done);
    
        function getResourcePath(resource) {
    
            if (resource.substr(0, 12) === 'application/') {
                return 'application/' + resource.substr(12);
            }
    
            if (resource.substr(0, 10) !== 'libraries/') {
                return resource;
            }
    
            var type;
    
            // Extract the type of the resource to get the moduleID
            var moduleID = (function (resource) {
    
                resource = resource.split('/');
                type = resource.pop();
                return resource.join('/');
    
            })(resource);
    
            var multilanguage = beyond.modules.multilanguage.get(moduleID);
            if (multilanguage && multilanguage.indexOf(type) !== -1) {
                return resource + '/' + beyond.params.language;
            }
            else {
                return resource;
            }
    
        }
    
        function load() {
    
            var mods = [];
    
            var dependency;
            for (var resource in dependencies.require) {
                mods.push(getResourcePath(resource));
            }
    
            // Wait for react to be ready if react is on the dependencies list
            if (mods.indexOf('react') !== -1) {
                module.react.done(coordinate.react);
            }
            else {
                coordinate.done('react');
            }
    
            if (mods.length) {
    
                require(mods, function () {
    
                    var args = [].slice.call(arguments);
    
                    var i = 0;
                    for (dependency in dependencies.require) {
    
                        var name = dependencies.require[dependency];
                        modules[name] = args[i];
                        i++;
    
                    }
    
                    coordinate.done('require');
    
                });
    
            }
            else {
                coordinate.done('require');
            }
    
            if (dependencies.controls instanceof Array && dependencies.controls.length) {
                beyond.controls.import(dependencies.controls, coordinate.controls);
            }
            else {
                coordinate.done('controls');
            }
    
        }
    
        if (dependencies) load();
    
    }
741768
protected function resolveDependencies()
    {
        $objectManager = $this->bootstrap->getObjectManager();
        $this->baseComponentChain = $objectManager->get(ComponentChain::class);
    }
1261243
public function preCompile(CompilationContext $compilationContext)
    {
        $this->compiler = $compilationContext->compiler;

        /*
         * Pre-Compile methods
         */
        foreach ($this->methods as $method) {
            if ('class' == $this->getType() && !$method->isAbstract()) {
                $method->preCompile($compilationContext);
            }
        }
    }
876057
public function add($element, $dependencies = array())
    {
        // Add
        $this->elements[$element] = (object)array(
            'id' => $element,
            'dependencies' => (array)$dependencies,
            'visited' => false
        );
    }
1366382
public function register( $context = null ) {
		$context = $this->validate_context( $context );
		array_walk( $this->dependencies,
			[ $this, 'register_dependency_type' ], $context );
	}
523622
public function dependencies( $h5p = null, $downloads = null, $contributors = null ) {
		$this->h5p = $h5p ? $h5p : \Pressbooks\Interactive\Content::init()->getH5P();
		$this->downloads = $downloads ? $downloads : new Downloads( $this, $this->h5p );
		$this->contributors = $contributors ? $contributors : new \Pressbooks\Contributors();
	}
1303651
public function getDependencies()
    {
        // Simple cache.
        if (is_array($this->dependencies)) {
            return $this->dependencies;
        }
        $this->dependencies = [];

        $filter = new StatementFilter();
        $parser = new CodeParser();

        $statements = $parser->parseFile($this->directory.'/version.php');

        try {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'plugin', 'dependencies');
        } catch (\Exception $e) {
            try {
                $assign = $filter->findFirstPropertyFetchAssignment($statements, 'module', 'dependencies');
            } catch (\Exception $e) {
                return $this->dependencies;
            }
        }

        if (!$assign->expr instanceof Array_) {
            throw new \RuntimeException('The $plugin->dependencies must be assigned to an array in the version.php file.');
        }
        $this->dependencies = $filter->arrayStringKeys($assign->expr);

        return $this->dependencies;
    }
1095076
function createDependencyTree( &$dependenciesNode, $dependencyType, $list )
    {
        $dom = $dependenciesNode->ownerDocument;

        foreach ( $list as $dependencyItem )
        {
            unset( $dependencyNode );
            $dependencyNode = $dom->createElement( $dependencyType );
            $dependencyNode->setAttribute( 'type', $dependencyItem['type'] );
            $dependencyNode->setAttribute( 'name', $dependencyItem['name'] );
            if ( $dependencyItem['value'] )
                $dependencyNode->setAttribute( 'value', $dependencyItem['value'] );
            $dependenciesNode->appendChild( $dependencyNode );
            $handler = $this->packageHandler( $dependencyItem['name'] );
            if ( $handler )
            {
                $handler->createDependencyNode( $this, $dependencyNode, $dependencyItem, $dependencyType );
            }
        }
    }
1062730
function dependencyItems( $dependencySection, $parameters = false )
    {
        if ( !in_array( $dependencySection,
                        array( 'provides', 'requires',
                               'obsoletes', 'conflicts' ) ) )
            return false;

        if ( $parameters === false )
        {
            return $this->Parameters['dependencies'][$dependencySection];
        }

        $matches = array();
        $dependencyItems = $this->Parameters['dependencies'][$dependencySection];
        foreach ( $dependencyItems as $dependencyItem )
        {
            $found = true;

            foreach ( $parameters as $paramName => $paramValue )
            {
                if ( !isset( $dependencyItem[$paramName] ) ||
                     $dependencyItem[$paramName] != $paramValue )
                {
                    $found = false;
                    break;
                }
            }

            if ( $found )
                $matches[] = $dependencyItem;
        }

        return $matches;
    }
991369
public function generate($source = null)
    {
        // set input
        $this->getParser()->setInput(
            ['className' => $source]
        );

        // Add these dependencies to collection
        $this->addRawDependenciesToCollection($this->getParser()->parse(), $source);
    }
1001086
public function build(ReflectionClass $reflectionClass, Service $annotation, Definition $definition)
    {
        /** @var Definition $definition */
        [$serviceId, $definition] = parent::build($reflectionClass, $annotation, $definition);

        $definition->setPublic(false);
        $this->container->setDefinition($serviceId, $definition);

        /** @var CompilerPassInterface $compilerPass */
        $compilerPass = $this->container->get($serviceId);
        $this->container->addCompilerPass(
            $compilerPass,
            $annotation->type,
            $annotation->priority
        );

        return [$serviceId, $definition];
    }
931587
void onCompletion(Collection<ApplicationDependency> dependencies) {
        if (!dependencies.isEmpty()) {
            for (ApplicationDependency dependency : dependencies) {
                dependency.onCompletion(this);
            }
        }
    }