require_once __DIR__ . '/vendor/autoload.php';
$data = [
[':ClassName:' => 'My_job', ':job_id:' => 'JIRO0001', ':Service:' => 'MyService'],
[':ClassName:' => 'Your_job', ':job_id:' => 'JIRO0002', ':Service:' => 'MyService'],
[':ClassName:' => 'His_job', ':job_id:' => 'JIRO0003', ':Service:' => 'MyService'],
[':ClassName:' => 'Her_job', ':job_id:' => 'JIRO0004', ':Service:' => 'MyService'],
[':ClassName:' => 'Our_job', ':job_id:' => 'JIRO0004', ':Service:' => 'MyService'],
];
foreach ($data as $item) {
$filename = __DIR__ . sprintf('/files/%s.php', $item[':ClassName:']);
if (file_exists($filename)) {
continue;
}
$Generator = new Generator\Generator(new SplFileObject($filename, 'w'));
$contents = file_get_contents(__DIR__ . '/files/template/Job.txt');
$Generator->setContents($contents);
$Generator->replace($item);
$Generator->fire();
}
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
niikunihiro/generator
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published