Location: PHPKode > scripts > SimpleTPL > simpletpl/SimpleTPL.class.php
<?php
/**
 * 
 * Patrick J. Mizer
 * <hide@address.com>
 * 
 * May 28, 2006
 * 
 * Very lightweight *but functional* template system.
 * 
 */
class SimpleTPL {

    function SimpleTPL() {
    	
    }
    
    function assignValue($name, $value)
    {
    	$this->$name = $value;
    }
    
    function renderTemplate($templatePath)
    {
    	if(file_exists($templatePath)){
    		require($templatePath);
    	}else {
    		$this->_handleError('Could not locate template: <b>' . $templatePath . '</b>');
    	}
    }
    
    function cleanUp() 
	{
		@settype(&$this, 'null');
	}
    
    function _handleError($msg)
    {
    	echo $msg;
    }
}
?>
Return current item: SimpleTPL