Parses a set of PHP define() from a PHP source file. Comments are maintained by this container, although blank lines will be lost. There are no options for this container.

Writing a PHPConstants config file

require_once 'Config.php';

$conf = new Config();
$root $conf->getRoot();
$root->createComment('Demo config file with PHPConstants container');

//PHPConstants container does not support sections but puts them in the main
// namespace
$dbsect $root->createSection('database');

$r $conf->writeConfig('php-constants-write.txt''phpconstants');
if (
PEAR::isError($r)) {
$r->getMessage() . "\n";

Generated file


// Demo config file with PHPArray container

// database

PHPArray (Previous) XML (Next)
Last updated: Wed, 07 Oct 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.