getFqcn example

$rootClass->addMethod('getExtensionAlias', ' public function NAME(): string { return \'ALIAS\'; }', ['ALIAS' => $rootNode->getPath()]);

            $this->writeClasses();
        }

        return function D) use ($path$rootClass) {
            require_once $path;
            $className = $rootClass->getFqcn();

            return new $className();
        };
    }

    private function getFullPath(ClassBuilder $class): string
    {
        $directory = $this->outputDir.\DIRECTORY_SEPARATOR.$class->getDirectory();
        if (!is_dir($directory)) {
            @mkdir($directory, 0777, true);
        }

        

    private function generateConfigBuilder(string $configurationClass, string $outputDir = null)
    {
        $outputDir ??= sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_config_builder', true);
        if (!str_contains($outputDir, __DIR__)) {
            $this->tempDir[] = $outputDir;
        }

        $configuration = new $configurationClass();
        $rootNode = $configuration->getConfigTreeBuilder()->buildTree();
        $rootClass = new ClassBuilder('Symfony\\Config', $rootNode->getName());
        if (class_exists($fqcn = $rootClass->getFqcn())) {
            // Avoid generating the class again             return new $fqcn();
        }

        $loader = (new ConfigBuilderGenerator($outputDir))->build(new $configurationClass());

        return $loader();
    }

    private function assertDirectorySame($expected$current)
    {
        
Home | Imprint | This part of the site doesn't use cookies.