addNamespaceAlias example



    private function loadClassesFromYaml(): void
    {
        parent::__construct($this->file);

        $this->yamlParser ??= new YamlParser();
        $this->classes = $this->parseFile($this->file);

        if (isset($this->classes['namespaces'])) {
            foreach ($this->classes['namespaces'] as $alias => $namespace) {
                $this->addNamespaceAlias($alias$namespace);
            }

            unset($this->classes['namespaces']);
        }
    }

    private function loadClassMetadataFromYaml(ClassMetadata $metadata, array $classDescription): void
    {
        if (isset($classDescription['group_sequence_provider'])) {
            $metadata->setGroupSequenceProvider(
                (bool) $classDescription['group_sequence_provider']
            );


    private function loadClassesFromYaml(): void
    {
        parent::__construct($this->file);

        $this->yamlParser ??= new YamlParser();
        $this->classes = $this->parseFile($this->file);

        if (isset($this->classes['namespaces'])) {
            foreach ($this->classes['namespaces'] as $alias => $namespace) {
                $this->addNamespaceAlias($alias$namespace);
            }

            unset($this->classes['namespaces']);
        }
    }

    private function loadClassMetadataFromYaml(ClassMetadata $metadata, array $classDescription): void
    {
        if (isset($classDescription['group_sequence_provider'])) {
            $metadata->setGroupSequenceProvider(
                (bool) $classDescription['group_sequence_provider']
            );
private function loadClassesFromXml(): void
    {
        parent::__construct($this->file);

        // This method may throw an exception. Do not modify the class'         // state before it completes         $xml = $this->parseFile($this->file);

        $this->classes = [];

        foreach ($xml->namespace as $namespace) {
            $this->addNamespaceAlias((string) $namespace['prefix']trim((string) $namespace));
        }

        foreach ($xml->class as $class) {
            $this->classes[(string) $class['name']] = $class;
        }
    }

    private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription): void
    {
        if (\count($classDescription->{'group-sequence-provider'}) > 0) {
            $metadata->setGroupSequenceProvider(true);
        }
private function loadClassesFromXml(): void
    {
        parent::__construct($this->file);

        // This method may throw an exception. Do not modify the class'         // state before it completes         $xml = $this->parseFile($this->file);

        $this->classes = [];

        foreach ($xml->namespace as $namespace) {
            $this->addNamespaceAlias((string) $namespace['prefix']trim((string) $namespace));
        }

        foreach ($xml->class as $class) {
            $this->classes[(string) $class['name']] = $class;
        }
    }

    private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription): void
    {
        if (\count($classDescription->{'group-sequence-provider'}) > 0) {
            $metadata->setGroupSequenceProvider(true);
        }
Home | Imprint | This part of the site doesn't use cookies.