Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. class View
  4. {
  5.     protected $data = [];
  6.     protected $template;
  7.  
  8.     public function assign($name, $value)
  9.     {
  10.         $this->data[] = [$name, $value];
  11.     }
  12.  
  13.     public function display($template)
  14.     {
  15.         $this->template = __DIR__ . $template;
  16.         echo $this->template;
  17.     }
  18.  
  19.     public function render($template) {
  20.         $this->template = __DIR__ . $template;
  21.         return $this->template;
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement