private function parseImports($content)
    {
        if (!isset($content['imports'])) {
            return [];
        }

        if (!is_array($content['imports'])) {
            throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $this->fileName));
        }

        $additionalDefinitions = [];

        foreach ($content['imports'] as $import) {
            if (!is_array($import)) {
                throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $this->fileName));
            }

            if (isset($import['ignore_errors'])) {
                throw new InvalidArgumentException(sprintf('The "ignore_errors" key is not supported in YamlDefinitionLoader. This is a Symfony specific syntax. Check your YAML syntax.', $this->fileName));
            }

            $importFileName = $import['resource'];

            if (strpos($importFileName, '/') !== 0) {
                $importFileName = dirname($this->fileName).'/'.$importFileName;
            }

            $yamlDefinitionLoader = new self($importFileName);
            $newDefinitions = $yamlDefinitionLoader->getDefinitions();

            $additionalDefinitions = $newDefinitions + $additionalDefinitions;
        }

        return $additionalDefinitions;
    }
private function parseImports($content)
    {
        if (!isset($content['imports'])) {
            return [];
        }

        if (!is_array($content['imports'])) {
            throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $this->fileName));
        }

        $additionalDefinitions = [];

        foreach ($content['imports'] as $import) {
            if (!is_array($import)) {
                throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $this->fileName));
            }

            if (isset($import['ignore_errors'])) {
                throw new InvalidArgumentException(sprintf('The "ignore_errors" key is not supported in YamlDefinitionLoader. This is a Symfony specific syntax. Check your YAML syntax.', $this->fileName));
            }

            $importFileName = $import['resource'];

            if (strpos($importFileName, '/') !== 0) {
                $importFileName = dirname($this->fileName).'/'.$importFileName;
            }

            $yamlDefinitionLoader = new self($importFileName);
            $newDefinitions = $yamlDefinitionLoader->getDefinitions();

            $additionalDefinitions = $newDefinitions + $additionalDefinitions;
        }

        return $additionalDefinitions;
    }
private function parseImports ( $ content ) { if ( ! isset ( $ content [ 'imports' ] ) ) { return [ ] ; } if ( ! is_array ( $ content [ 'imports' ] ) ) { throw new InvalidArgumentException ( sprintf ( 'The "imports" key should contain an array in %s. Check your YAML syntax.' , $ this -> fileName ) ) ; } $ additionalDefinitions = [ ] ; foreach ( $ content [ 'imports' ] as $ import ) { if ( ! is_array ( $ import ) ) { throw new InvalidArgumentException ( sprintf ( 'The values in the "imports" key should be arrays in %s. Check your YAML syntax.' , $ this -> fileName ) ) ; } if ( isset ( $ import [ 'ignore_errors' ] ) ) { throw new InvalidArgumentException ( sprintf ( 'The "ignore_errors" key is not supported in YamlDefinitionLoader. This is a Symfony specific syntax. Check your YAML syntax.' , $ this -> fileName ) ) ; } $ importFileName = $ import [ 'resource' ] ; if ( strpos ( $ importFileName , '/' ) !== 0 ) { $ importFileName = dirname ( $ this -> fileName ) . '/' . $ importFileName ; } $ yamlDefinitionLoader = new self ( $ importFileName ) ; $ newDefinitions = $ yamlDefinitionLoader -> getDefinitions ( ) ; $ additionalDefinitions = $ newDefinitions + $ additionalDefinitions ; } return $ additionalDefinitions ; }
Parses all imports.

@param array $content
@param $content

@return DefinitionInterface[]
Parses all imports .