コード例 #1
0
ファイル: View.php プロジェクト: vityabond/cmf-big-maker
 private function load($args)
 {
     $folder = null;
     $template = null;
     if (count($args) == 1) {
         $template = $args[0];
         // $this->load($template);
     } elseif (count($args) == 2) {
         $folder = $args[0];
         $template = $args[1];
     }
     // print_r( $template);
     $this->_root = Path::getRoot('template/');
     $this->_url = Path::getURL('template/');
     if ($folder) {
         $this->_root .= $folder . '/';
         $this->_url .= $folder . '/';
     }
     //  echo $this->_root.'---';
     $this->_template = $template;
     $this->_folder = $folder;
     $template_path = $this->_root . $template;
     // echo $template_path;
     if (file_exists($template_path)) {
         $this->_templateFullPath = $template_path;
     } else {
         throw new Exception('File ' . $template_path . ' not exists.');
     }
 }
コード例 #2
0
 public function __construct($mode = 'r')
 {
     $this->dbConnFile = Path::getDocRoot() . "System/DBConfig.txt";
     $this->SetDBConnData($mode);
 }