예제 #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);
 }