src/Metadata/Driver/YamlDriver.php
protected function parseNamespaces(ClassMetadata $metadata, $config)
    {
        if (!isset($config['namespaces'])) {
            return;
        }

        if (!is_array($config)) {
            throw new \RuntimeException(sprintf('Invalid YAML configuration for "%s" : "namespaces" property need to be an array.', $metadata->name));
        }

        foreach ($config['namespaces'] as $prefix => $uri) {
            $metadata->addGraphNamespace(new NamespaceNode([
                'prefix' => $prefix,
                'uri'    => $uri,
            ]));
        }
    }
protected function parseNamespaces(ClassMetadata $metadata, $config)
    {
        if (!isset($config['namespaces'])) {
            return;
        }

        if (!is_array($config)) {
            throw new \RuntimeException(sprintf('Invalid YAML configuration for "%s" : "namespaces" property need to be an array.', $metadata->name));
        }

        foreach ($config['namespaces'] as $prefix => $uri) {
            $metadata->addGraphNamespace(new NamespaceNode([
                'prefix' => $prefix,
                'uri'    => $uri,
            ]));
        }
    }
protected function parseNamespaces ( ClassMetadata $ metadata , $ config ) { if ( ! isset ( $ config [ 'namespaces' ] ) ) { return ; } if ( ! is_array ( $ config ) ) { throw new \ RuntimeException ( sprintf ( 'Invalid YAML configuration for "%s" : "namespaces" property need to be an array.' , $ metadata -> name ) ) ; } foreach ( $ config [ 'namespaces' ] as $ prefix => $ uri ) { $ metadata -> addGraphNamespace ( new NamespaceNode ( [ 'prefix' => $ prefix , 'uri' => $ uri , ] ) ) ; } }
Parse namespaces configuration

@param ClassMetadata $metadata
@param mixed         $config
Parse namespaces configuration