PHP Classes
Icontem

File: class.PHPLIBTemplateAdaptor.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jesus M. Castagnetto  >  Generalized CachedTemplate class  >  class.PHPLIBTemplateAdaptor.php  
File: class.PHPLIBTemplateAdaptor.php
Role: ???
Content type: text/plain
Description: Adaptor class for PHPLIB's Template class
Class: Generalized CachedTemplate class
General Template Caching class
 

Contents

Class file image Download
<?php

/*
 * Class TemplateAdaptor (PHPLIB Template version)
 * by Jesus M. Castagnetto (jmcastagnetto@zkey.com)
 * (c) 2000. Version 1.1
 *
 * $Id: class.PHPLIBTemplateAdaptor.php,v 1.1 2000/07/17 04:54:16 jesus Exp $
 *
 * Description:
 * This class extends PHPLIB's (http://phplib.shonline.de/) Template class,
 * implementing methods and attributes needed for the CachedTemplate class.
 *
 * The adaptor class needs to implement the getTemplatesList() method that
 * returns an array with the names of the templates loaded, the init() 
 * method used to initialize the constructor of the parent template class,
 * and the getParsedDoc() method which returns the parsed document.
 *
 * Changes:
 * 2000/07/16 - Initial release.
 * 2000/07/17 - Documentation, new release.
 */


class TemplateAdaptor extends Template {

	var $TEMPLATES = array();
	
	/*
	 * This method is used to initialize the parent class
	 */

	function init($pathToTemplates=".", $unknowns="remove") {
		$this->Template($pathToTemplates, $unknowns);
	}

	/*
	 * method to return the list of template names
	 */
	
	function getTemplatesList() {
		if (count($this->file) > 0 ) {
			while (list($tag, $fn) = each($this->file))
				$this->TEMPLATES[] = $this->$fn;
		}
		return $this->TEMPLATES;
	}

	/*
	 * method to return the parsed document
	 */
	
	function getParsedDoc($sect="") {
		return $this->get($sect);
	}

} // end of class definition
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products