PHP code example of scedel / codegen-symfony
1. Go to this page and download the library: Download scedel/codegen-symfony library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scedel / codegen-symfony example snippets
use Scedel\Codegen\Symfony\SymfonyCodeGenerator;
use Scedel\Codegen\Symfony\SymfonyCodegenOptions;
$generator = new SymfonyCodeGenerator();
$result = $generator->generate(
$repository,
new SymfonyCodegenOptions(
outputDir: 'src/Dto/Scedel',
defaultNamespace: 'App\\Dto\\Scedel',
),
);
foreach ($result->files as $file) {
file_put_contents($file->path, $file->contents);
}
bash
php scedel-codegen-symfony/bin/generate-symfony.php \
--output-dir src/Dto/Scedel \
--namespace App\\Dto\\Scedel \
/absolute/path/schema.scedel