PHP Classes

waPluginator: Generate sets of source files from templates

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 315 All time: 7,259 This week: 560Up
Version License PHP version Categories
wapluginator 0.8MIT/X Consortium ...5.3PHP 5, Templates, Configuration


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: 61
All time rank: 502 in Russian Federation Russian Federation
Week rank: 28 Up1 in Russian Federation Russian Federation Up
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]'
       ,'link' =>''
$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
  Files folder image Files  
File Role Description
Files folder imagedemo (4 files)
Files folder imagelib (1 file)
Files folder imagesrc (5 files)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  demo  
File Role Description
  Accessible without login Plain text file as_jsfunclib.js Data Auxiliary data
  Accessible without login Plain text file generator.php Example Example
  Accessible without login Plain text file jquery-2.2.2.min.js Data Auxiliary data
  Accessible without login Plain text file styles.css Data Auxiliary data

  Files folder image Files  /  lib  
File Role Description
  Plain text file class.codePreprocessor.php Class Class source

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file colorSchemes.xml Data Auxiliary data
  Accessible without login Plain text file waPluginator.lng.en.php Conf. Configuration script
  Accessible without login Plain text file Conf. Configuration script
  Plain text file waPluginator.php Class Class source
  Accessible without login Plain text file waPluginator.xml Data Auxiliary data 72KB
Downloadwapluginator-2022-10-21.tar.gz 71KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Code Preprocessor Download .zip .tar.gz Uses preprocessor in main action Required
 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,259
This week:560Up
 User Ratings  
 All time