Location: PHPKode > projects > DIY Blog > diy-blog/lib/propel/generator/templates/conf/Control.tpl

 * Control script which converts a properties file (in XML or INI-style .properties) into PHP array.
 * This conversion exists for performance reasons only.
 * @author Hans Lellelid <hide@address.com>
 * @version $Revision: 1.2 $
 // we expect to have:
 //		$propertiesFile - path to xml/ini file.

$pfile = new PhingFile($propertiesFile);
if (!$pfile->exists()) {	
    throw new BuildException("Property file does not exist: $propertiesFile");

$pfileName = explode('.', $pfile->getName());
$format = array_pop($pfileName);

switch($format) {
    case 'xml':
        include 'xml.tpl';
        throw new BuildException("Propel now only supports the XML runtime conf format (expected to find a runtime file with .xml extension).");
Return current item: DIY Blog