Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class View
- {
- protected $data = [];
- protected $template;
- public function assign($name, $value)
- {
- $this->data[$name] = $value;
- }
- public function display($template)
- {
- $this->template = __DIR__ . $template;
- include $this->template;
- }
- //public function render($template) {
- // $this->template = __DIR__ . $template;
- // return $this->template;
- //}
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement