Ejemplo n.º 1
0
 /**
  * Create an auxiliar instance (as singleton)
  *
  * @param string $classname
  */
 static final function createAuxiliarEngine(&$from = null)
 {
     if (is_null($from)) {
         $classname = self::$__super_class;
     } else {
         $classname = get_class($from);
     }
     if (!is_null(self::$__engine)) {
         if (get_class(self::$__engine) != $classname) {
             self::$__engine = null;
         }
     }
     if (is_null(self::$__engine)) {
         if (self::$__log_mode) {
             self::log("createAuxiliarEngine: A new {$classname} instance will be created ...");
         }
         $tmp = self::$__discard_file_system;
         self::$__discard_file_system = true;
         self::$__engine = new $classname("", array());
         if (!is_null($from)) {
             self::$__engine->__items = $from->__items;
             self::$__engine->__items_orig = $from->__items_orig;
         }
         self::$__discard_file_system = $tmp;
     }
 }