示例#1
0
 /**
  * Sets our global singleton to something else; useful for overloading
  * functions.
  */
 public static function setSingleton($singleton)
 {
     FSTools::$singleton = $singleton;
 }
示例#2
0
文件: File.php 项目: ajnok/yii2book
 /**
  * Filename of file you wish to instantiate.
  * @note This file need not exist
  */
 public function __construct($name, $fs = false)
 {
     $this->name = $name;
     $this->fs = $fs ? $fs : FSTools::singleton();
 }
 function __destruct()
 {
     FSTools::singleton()->rmdirr($this->dir);
 }