1. Go to this page and download the library: Download codenamephp/installer 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/ */
codenamephp / installer example snippets
use de\codenamephp\installer\StepExecutor;
use de\codenamephp\installer\steps\CopyTemplateFolder;
use de\codenamephp\installer\steps\CreateFolders;
use de\codenamephp\installer\steps\DeleteFilesAndFolders;
use de\codenamephp\installer\steps\SequentialCollection;
use de\codenamephp\installer\templateCopy\directoryHandler\CreateDirectoryWithSymfonyFilesystem;
use de\codenamephp\installer\templateCopy\fileHandler\RenderWithTwigAndDumpWithSymfonyFilesystem;
use de\codenamephp\installer\templateCopy\variableReplacer\FramedStringReplace;
use Symfony\Component\Filesystem\Filesystem;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
return call_user_func(static function() {
ithSymfonyFilesystem($filesystem, $variableReplacer, new Environment(new FilesystemLoader('/', '/')))
),
__DIR__ . '/templates',
dirname(__DIR__),
$variables
),
new CreateFolders($variableReplacer, $filesystem, [dirname(__DIR__) . '/src'], $variables),
new DeleteFilesAndFolders($variableReplacer, $filesystem, [__DIR__], $variables),
)
))->run();
});