Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. <?php
  2. class Template{
  3.     private $template, $params, $values;
  4.     function addVariable($param, $value){
  5.         $this->params[] = $param;
  6.         $this->values[] = $values;
  7.     }
  8.    
  9.     function parse(){
  10.         return = str_replace($this->params, $this->values, $this->template);
  11.     }
  12.    
  13.     function __construct($file){
  14.         $this->template = file_get_contents($file);
  15.     }
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement