예제 #1
0
 function __construct()
 {
     parent::__construct();
     $this->js_url = "/javascripts";
     $this->js_libs_url = "/javascripts/libs";
     $this->js_libs = array('jquery' => "jquery-1.2.1.pack.js");
     $this->js_charset = "utf-8";
 }
예제 #2
0
 function read($pref, $force_create = false, $create_path = null)
 {
     if (!isset($this->{$pref}) && count($this->__pref_paths) > 0) {
         $valid_path = false;
         for ($i = 0; $i < count($this->__pref_paths); $i++) {
             if (is_file($this->__pref_paths[$i] . '/' . $pref . '.prefs.php')) {
                 $valid_path = $this->__pref_paths[$i];
                 break;
             }
         }
         if ($valid_path !== false) {
             include_once $valid_path . '/' . $pref . '.prefs.php';
             $class = $pref . '_preferences';
             if (class_exists($class)) {
                 self::$__current_pref_file = $valid_path . '/' . $pref . '.prefs.php';
                 $this->{$pref} = new $class();
                 self::$__current_pref_file = null;
                 if (is_object($this->{$pref})) {
                     return true;
                 }
             }
         } elseif ($force_create) {
             $object = new PreferenceContainer();
             if ($create_path == null) {
                 $create_path = $this->__pref_paths[0];
             }
             if ($object->save($pref, $create_path)) {
                 $this->read($pref);
                 return true;
             } else {
                 return false;
             }
         }
     }
     return false;
 }
예제 #3
0
 function __construct()
 {
     parent::__construct();
     $this->autoload = array('Timer' => "/Users/dave/Sites/dev/example/framework/lib/timer.lib.php", 'StatusCode' => "/Users/dave/Sites/dev/example/framework/lib/statuscode.class.php");
 }
예제 #4
0
 function __construct()
 {
     parent::__construct();
     $this->language = "english";
 }