PHP code example of joseki / file-template
1. Go to this page and download the library: Download joseki/file-template 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/ */
joseki / file-template example snippets
yml
extensions:
FileTemplate: Joseki\FileTemplate\DI\FileTemplateExtension
FileTemplate:
# root dir for new files
rootDir: '%appDir%' # [OPTIONAL], %appDir% is default
# list of file templates groups
commands:
example1: # group name used in command line
variables: ['CONTROL', 'NAMESPACE']
templates:
CONTROL_FILE: '%appDir%/templates/control.txt'
FACTORY_FILE: '%appDir%/templates/factory.txt'
TEMPLATE_FILE: '%appDir%/templates/template.txt'
defaults: # [OPTIONAL] default values for variables
CONTROL_FILE: '${CONTROL}.php'
FACTORY_FILE: '${CONTROL}Factory.php'
TEMPLATE_FILE: template.latte