loadClassesFromYaml example

$this->file = $file;
    }

    /** * Caches the used YAML parser. */
    private YamlParser $yamlParser;

    public function loadClassMetadata(ClassMetadata $metadata): bool
    {
        if (null === $this->classes) {
            $this->loadClassesFromYaml();
        }

        if (isset($this->classes[$metadata->getClassName()])) {
            $classDescription = $this->classes[$metadata->getClassName()];

            $this->loadClassMetadataFromYaml($metadata$classDescription);

            return true;
        }

        return false;
    }
$this->file = $file;
    }

    /** * Caches the used YAML parser. */
    private YamlParser $yamlParser;

    public function loadClassMetadata(ClassMetadata $metadata): bool
    {
        if (!isset($this->classes)) {
            $this->loadClassesFromYaml();
        }

        if (isset($this->classes[$metadata->getClassName()])) {
            $classDescription = $this->classes[$metadata->getClassName()];

            $this->loadClassMetadataFromYaml($metadata$classDescription);

            return true;
        }

        return false;
    }
Home | Imprint | This part of the site doesn't use cookies.