Isn't there a rule about bringing dead threads back to life?
| SitePoint Sponsor |




Isn't there a rule about bringing dead threads back to life?
Off Topic:
Perhaps with the return of this movie genre it is time for undead threadsOriginally Posted by Travis
![]()
![]()
Jason Sweat ZCE - jsweat_php@yahoo.com
Book: PHP Patterns
Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
Detestable (adjective): software that isn't testable.




Suggested definition of the technical term "undead thread": A thread that has a gap of more than 6 months with no postings and no substantial on-topic discussion after the gap.Originally Posted by sweatje
![]()
Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
Very interesting post. In fact to smooth that process, some DBMS like PostgreSQL support "table inheritance". See the Inheritance section of the PostgreSQL 7.4.13 Documentation. If your favourite DBMS doesn't support that powerful feature, say MySQL or SQLite, the solution is to use Data Access Objects (DAO), as PHP classes can be inherited. In your case there would be a publication class and the article class would "extend" it, adding its own "fields" to it : id, bodycopy...Originally Posted by shoebox




is this vincent of the Yapter http://yapter.sourceforge.net/ and php freakz ?
Business as usual is off the menu folks, ...





No, it's other VincentOriginally Posted by Galo
.
Thats more or less exactly what I've been using for months now. Works very well and you can set variables for use in the template.PHP Code:<?php
/* AwesomeTemplateEngine.class.php */
class AwesomeTemplateEngine {
var $templatePath;
var $vars;
function AwesomeTemplateEngine($templatePath) {
$this->templatePath=$templatePath;
}
function set($value, $name) {
$this->vars[$name] = is_object($value) ? $value->fetch() : $value;
}
function parseTemplate($dataObject,$template) {
extract($this->vars);
ob_start();
include($this->templatePath.$template);
$strParsedTemplate = ob_get_contents();
ob_end_clean();
return $strParsedTemplate;
}
}
?>





> Note: This thread is more than 46 months old. Please consider creating a new thread instead.
Why try to bring life to the dead though? There isn't anything particularly interesting or innovative about your class, I'm sorry to say![]()
![]()
Bookmarks