Beispiel #1
0
 static function loadUserFile($file, $defaultLocation = '.', $globalize = null, $vars = null, $extract = null)
 {
     if ($file) {
         $file = self::userFileLocation($file, $defaultLocation);
         return Files::req($file, $globalize, $vars, $extract);
     }
 }
Beispiel #2
0
 /**
 @param	template	string path to template file relative to the templateFolder.  .php is appended to this path.
 @param	vars	variables to extract and make available to the template file
 @return	output from a template
 */
 protected function getTemplate($template, $vars = null)
 {
     $vars['thisTemplate'] = $template;
     $vars['control'] = $this->control;
     $vars['view'] = $this;
     //$this is reserved, can not use outside of object context
     ob_start();
     if (substr($template, -4) != '.php') {
         $template = $template . '.php';
     }
     Files::req($_ENV['templateFolder'] . $template, null, $vars);
     $output = ob_get_clean();
     return $output;
 }
Beispiel #3
0
 static function req($path)
 {
     $file = \Config::userFileLocation($path, 'control') . '.php';
     return \Files::req($file, array('control'));
 }