Source for file Tool.php
Documentation is available at Tool.php
* Command line tool to use the HTML_Template_PHPLIB validator and generator.
* @package HTML_Template_PHPLIB
* @author Christian Weiske <cweiske@php.net>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link http://pear.php.net/package/HTML_Template_PHPLIB
$this->{'do' . ucfirst($strAction)}($args);
}//function HTML_Template_PHPLIB_Tool($args)
}//function getAction(&$args)
function dieHard($strMessage, $nExitCode)
}//function dieHard($strMessage, $nExitCode)
Usage: html_template_phplibtool action parameters
Tool to validate and work with HTML templates
mode: (- and -- are optional)
h, help Show this help screen
v, validate Validate a template file
$this->dieHard("No template files to validate\n", 1 );
require_once 'HTML/Template/PHPLIB/Validator.php';
foreach ($args as $file) {
if ($arErrors === true ) {
echo 'No errors found in ' . $file . "\n";
} else if ($arErrors === false ) {
echo 'Some unexpected error in ' . $file . "\n";
echo count($arErrors) . ' errors in ' . $file . "\n";
foreach ($arErrors as $arError) {
echo ' Line #' . $arError['line'] . ': ' . $arError['message'] . "\n";
echo 'File does not exist: ' . $file . "\n";
}//function doValidate($args)
$args = $GLOBALS['argv'];
}//class HTML_Template_PHPLIB_Tool
Documentation generated on Mon, 11 Mar 2019 15:10:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|