PHP code example of ilexn / config-object
1. Go to this page and download the library: Download ilexn/config-object 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/ */
ilexn / config-object example snippets
declare(strict_types=1);
use Example\ConfigObject\GenNameCreate;
use Ilex\ConfigObject\CreateMode;
use Ilex\ConfigObject\GeneratorManager;
use Ilex\ConfigObject\Setting;
use Ilex\ConfigObject\Tests\Fake\One;
nfigObject';
}
public function getTargetClassName(): string
{
return 'GenNameCreate';
}
public function getData(): One
{
return new One();
}
public function allowClass(): array
{
return [One::class];
}
};
$mode = CreateMode::each();
$generator = new \Ilex\ConfigObject\Generator();
$manager = new GeneratorManager($mode, $generator);
$manager->generate($setting);
$g = new GenNameCreate();
var_dump($g->getData()->getTargetPath());