PHP Classes

tmpwiz: Template processing based on string replacement

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 59%Total: 266 All time: 7,758 This week: 560Up
Version License Categories
tmpwiz 1.0Free for non-comm...Templates
Description 

Author

This class implements an template processing engine based on replacing the placeholder string values.

It can load templates from files and replaces locate and replace placeholders defined by given marks with parameter replacement strings.

The processed templates can returned as a text string or displayed as the output of the current script.

The documentation is in German.

Picture of Kay-Uwe
Name: Kay-Uwe <contact>
Classes: 1 package by
Country: Germany Germany
Age: 35
All time rank: 3923211 in Germany Germany
Week rank: 286 Up14 in Germany Germany Up

Details

Verwendung der Klasse tmpwiz() 1.Erstellen eines Objekts $obj_name=new tmpwiz(); 2.Laden einer Templatedatei $obj_name->load_tmp(); 3.(ggf.) Ersetzen von Strings 3.1Ersetzen mit Arrays $array['{ersetze_das_mit}']="dem hier"; $array['{und_das_mit}']="etwas anderem"; $obj_name->replace_a($array); 3.2Ersetzen einzelner Strings $what="{ersetze_das_mit}"; $with="dem hier"; $obj_name->replace_a($what,$with); 4.Ausgabe des Template Der im folgenen Verwendeten Parameter sin optional (freiwillig) wird kein Parameter angegeben wir echo verwendet. 4.1Ausgabe per echo (direkt) $obj_name->print_tmp("echo"); 4.2Ausgabe in Variable(als return Wert) $inhalt=$obj_name->print_tmp("vari"); 5.Ausgabe der letzten Fehlermeldung Der im folgenen Verwendeten Parameter sin optional (freiwillig) wird kein Parameter angegeben wir echo verwendet. 5.1Ausgabe per echo (direkt) $obj_name->get_err("echo"); 5.2Ausgabe in Variable(als return Wert) $fehlermeldung=$obj_name->get_err("vari"); 2oo5 by Dodge <dodge@justmail.de>

  Files folder image Files  
File Role Description
Accessible without login Plain text file body.htm Data template file
Plain text file class.tmpwiz.php Class Main Class file
Accessible without login Plain text file example.php Example example file
Accessible without login Plain text file foot.htm Data template file
Accessible without login Plain text file head.htm Data template file
Accessible without login Plain text file readme.txt Doc. german readme

 Version Control Unique User Downloads Download Rankings  
 0%
Total:266
This week:0
All time:7,758
This week:560Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:59%StarStarStar
Rank:1232