Skip to content

CyberSoftPl/Phing-PHPPre

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Phing-PHPPre

PHPPre is a preprocessor operating on PHP source code before deployment. It was written as internal task of Phing.

Features

Preprocessor can be used to:

  • conditional insertion of blocks of code
  • conditional source file inclusion
  • informing about errors and warnings in configuration
  • setting configuration

Currently supports directives:

  • Control:
    • #if SIMPLE_EXPRESSION
    • #ifdef DEFINITION
    • #ifndef DEFINITION
    • #else
    • #endif
    • #elif SIMPLE_EXPRESSION
    • #elifdef DEFINITION
    • #elifndef DEFINITION
  • Message:
    • #error
    • #message
    • #warning

Work in progress:

Future releases:

  • Definition:
    • #define
    • #undef
  • Includes:
    • #include "filename.php"
    • #include <filename.php>

Usage

<target name="preprocessing">
    <phppre>
        <fileset dir="../project/">
            <include name="**/*.php" />
        </fileset>
     </phppre>
</target>

Documentation

Available at github repository wiki.

Licensing

This software is licensed under GNU LGPL v3. You may find the terms in the "LICENSE" file in this directory.

About

Phing PHP Preprocessing task

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%