OSDN Git Service

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@881 1ca29b6e-896d...
[nucleus-jp/nucleus-plugins.git] / NP_UpdatePingServer / updatepingserver / admin / PlugView.php
1 <?php
2
3 class PlugView
4 {
5         var $vars = array();
6         var $tpl_file;
7         
8         function PlugView() {}
9
10         function assign($var, $value = null)
11         {
12                 $this->vars[$var] = $value;
13         }
14
15         function unsetAll()
16         {
17                 $this->vars = array();
18         }
19
20         function unsetVar($var)
21         {
22                 unset($this->vars[$var]);
23         }
24
25         function display($file)
26         {
27                 $this->tpl_file = $file;
28                 $this->_fetch();
29                 $this->tpl_file = null;
30         }
31
32         function _fetch()
33         {
34                 if (count($this->vars)) extract($this->vars);
35                 if (file_exists($this->tpl_file)) include($this->tpl_file);
36         }
37
38 }
39
40 ?>