Template replacements
This commit is contained in:
parent
07f7dd3352
commit
9fff959f18
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class Template {
|
class Template {
|
||||||
|
public static $replacements = array();
|
||||||
|
|
||||||
protected $template = null;
|
protected $template = null;
|
||||||
protected $data = array();
|
protected $data = array();
|
||||||
|
|
||||||
|
@ -84,6 +86,10 @@ class Template {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (self::$replacements as $key => $value) {
|
||||||
|
$contents = str_replace($key, $value, $contents);
|
||||||
|
}
|
||||||
|
|
||||||
$class->save();
|
$class->save();
|
||||||
|
|
||||||
return $contents;
|
return $contents;
|
||||||
|
|
Loading…
Add table
Reference in a new issue