/** * Sets our global singleton to something else; useful for overloading * functions. */ public static function setSingleton($singleton) { FSTools::$singleton = $singleton; }
/** * 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); }