waPluginator: Generate sets of source files from templates

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files (12)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
72%Total: 305 This week: 1All time: 7,248 This week: 261
Version License PHP version Categories
wapluginator 0.6MIT/X Consortium ...5.3PHP 5, Templates, Configuration
Description Author

This package can generate sets of source files from templates.

It can take a set of template files and process them replacing values from forms that configure the relevant template variables.

The templates are defined in a XML files that determines if the files are in a directory or a zip archive, as well the variable values to be taken from forms.

It also specifies color schemes to use to use in forms that can be read from separate files.

The templates can be processed with template processing class provided bt the package or external processors like scss or less for instance.

Innovation Award
PHP Programming Innovation award nominee
October 2016
Number 7

Prize: One downloadable copy of PhpED Professional
Some projects need to create files of different types, for instance to create themes and other types of configuration plugins.

Usually these files can be created from templates but if you need non-technical users to edit those files, they will not be able to do it because it is more complicated than they can handle.

This package provides a better alternative that consists in defining parameters that the users can edit using regular Web forms, thus without having to edit templates or configuration files.

Manuel Lemos
Picture of Alexander Selifonov
  Performance   Level  
Name: Alexander Selifonov is available for providing paid consulting. Contact Alexander Selifonov .
Classes: 20 packages by
Country: Russian Federation Russian Federation
Age: 58
All time rank: 522 in Russian Federation Russian Federation
Week rank: 61 6 in Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 16x

Winner: 2x


Code generator for modules, plugins and landing pages

Majority of web applications, CMS systems, frameworks use "modular" (or plugin) architecture. It allows easy developing of new functionality and adding it to the system independently from other modules. Quite often modules, or plugins, have a similar structure, so it would be great to have a kind of "template" with places for inserting specific "variable" values, and then create "initial stub" for a new module with these values inside. After that developer can modify generated files, adding needed specific (function implementation, CSS styling etc.)

Another often task is creating a collection of files for a "single page" - for example, adaptive landing page, based on predefined design.

For example, you want to create a landing page based on some royalty free pages available in internet, but you don't want each time to search places where to insert your titles, text blocks, css color codes etc.

In that case you just modify source page files, by adding special macros (like %textblock01%), and describe them in waPluginator config file.

waPluginator renders an html "designer" form for choosing template, entering user values and executing the "module creation process".

Using example

// waPluginator::setBaseUri('./backend.php'); // Use it if you have your own backend module
        'appname' =>'Your application name'
       ,'author' =>'My Name'
       ,'email' =>'Myemail [at] acme.com'
       ,'link' =>'http://www.yoursite.com'
$params = array_merge($_GET,$_POST);
if(!empty($params['action'])) {
else {
    app::setPageTitle('Plugin generator');

waPluginator uses CodePreprocessor to parse template files, but it allows attaching any additional text/source code processors (compilers), like "scss to css", "less to css" etc. You can attach compiler if it is implemented as PHP class with callable "compiling" method.

Working demo can be found in demo folder - generator.php

See using details in wiki

  • waPluginator.png
File Role Description
demo (4 files)
lib (1 file)
src (5 files)
LICENSE Lic. License text
README.md Doc. Documentation

  Files  /  demo  
File Role Description
   as_jsfunclib.js Data Auxiliary data
   generator.php Example Example
   jquery-2.2.2.min.js Data Auxiliary data
   styles.css Data Auxiliary data

  Files  /  lib  
File Role Description
   class.codePreprocessor.php Class Class source

  Files  /  src  
File Role Description
   colorSchemes.xml Data Auxiliary data
   waPluginator.lng.en.php Conf. Configuration script
   waPluginator.lng.ru.php Conf. Configuration script
   waPluginator.php Class Class source
   waPluginator.xml Data Auxiliary data

wapluginator-2017-06-08.zip 72KB
wapluginator-2017-06-08.tar.gz 70KB
Install with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Code Preprocessor .zip .tar.gz Uses preprocessor in main action Required
 Version Control Unique User Downloads Download Rankings  
This week:1
All time:7,248
This week:261
 User Ratings  
 All time

For more information send a message to info at phpclasses dot org.