Example #1
0
 protected static function factory($class)
 {
     if (!self::$instance) {
         self::$instance = new $class();
     }
     return self::$instance;
 }
Example #2
0
 public static function partial($path, $variables = array())
 {
     foreach ($variables as $key => $value) {
         ${$key} = $value;
     }
     if (!moojon_partials::has($path)) {
         moojon_partials::set($path, require_once $path);
     }
     moojon_partials::get($path);
 }