private function recurseAndParseSchemas(array $array, $rootDir)
    {
        foreach ($array as &$value) {
            if (\is_array($value)) {
                if (isset($value['schema'])) {
                    $fileDir = $this->getCachedFilePath($value['schema']);
                    $schema = null;
                    foreach ($this->schemaParsers as $schemaParser) {
                        try {
                            $schemaParser->setSourceUri(
                                'file://' . ($fileDir ? $fileDir : $rootDir . DIRECTORY_SEPARATOR)
                            );
                            $schema = $schemaParser->createSchemaDefinition($value['schema']);

                            break;
                        } catch (\RuntimeException $e) {
                        }
                    }

                    if ($schema === null) {
                        throw new InvalidSchemaFormatException();
                    }

                    $value['schema'] = $schema;
                } else {
                    $value = $this->recurseAndParseSchemas($value, $rootDir);
                }
            }
        }

        return $array;
    }
private function recurseAndParseSchemas(array $array, $rootDir)
    {
        foreach ($array as &$value) {
            if (\is_array($value)) {
                if (isset($value['schema'])) {
                    $fileDir = $this->getCachedFilePath($value['schema']);
                    $schema = null;
                    foreach ($this->schemaParsers as $schemaParser) {
                        try {
                            $schemaParser->setSourceUri(
                                'file://' . ($fileDir ? $fileDir : $rootDir . DIRECTORY_SEPARATOR)
                            );
                            $schema = $schemaParser->createSchemaDefinition($value['schema']);

                            break;
                        } catch (\RuntimeException $e) {
                        }
                    }

                    if ($schema === null) {
                        throw new InvalidSchemaFormatException();
                    }

                    $value['schema'] = $schema;
                } else {
                    $value = $this->recurseAndParseSchemas($value, $rootDir);
                }
            }
        }

        return $array;
    }
private function recurseAndParseSchemas ( array $ array , $ rootDir ) { foreach ( $ array as & $ value ) { if ( \ is_array ( $ value ) ) { if ( isset ( $ value [ 'schema' ] ) ) { $ fileDir = $ this -> getCachedFilePath ( $ value [ 'schema' ] ) ; $ schema = null ; foreach ( $ this -> schemaParsers as $ schemaParser ) { try { $ schemaParser -> setSourceUri ( 'file://' . ( $ fileDir ? $ fileDir : $ rootDir . DIRECTORY_SEPARATOR ) ) ; $ schema = $ schemaParser -> createSchemaDefinition ( $ value [ 'schema' ] ) ; break ; } catch ( \ RuntimeException $ e ) { } } if ( $ schema === null ) { throw new InvalidSchemaFormatException ( ) ; } $ value [ 'schema' ] = $ schema ; } else { $ value = $ this -> recurseAndParseSchemas ( $ value , $ rootDir ) ; } } } return $ array ; }
Recurses though resources and replaces schema strings

@param string $rootDir

@throws InvalidSchemaFormatException

@return array
Recurses though resources and replaces schema strings