1. Go to this page and download the library: Download shudd3r/skeletons 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/ */
shudd3r / skeletons example snippets
namespace Shudd3r\Skeletons;
use Shudd3r\Skeletons\Environment\Files\Directory\LocalDirectory;
$args = new InputArgs($argv);
$package = new LocalDirectory(get_cwd());
$template = new LocalDirectory(__DIR__ . '/template');
$app = new Application($package, $template);
use Shudd3r\Skeletons\Replacements\Replacement;
$app->replacement('package.name')->add(new Replacement\PackageName());
$app->replacement('repository.name')->add(new Replacement\RepositoryName('package.name'));
$app->replacement('package.description')->add(new Replacement\PackageDescription('package.name'));
$app->replacement('namespace.src')->add(new Replacement\SrcNamespace('package.name'));
use Shudd3r\Skeletons\Templates\Contents;
use Shudd3r\Skeletons\Templates\Template;
$app->template('composer.json')->createWith(
fn (Contents $contents) => new Template\MergedJsonTemplate(
new Template\BasicTemplate($contents->template()),
$contents->package(),
$args->command() === 'update'
)
);