function configure() { $fileSystems = $this->getConfig(); if ($fileSystems) { foreach ($fileSystems as $name => $params) { self::$fileSystems[$name] = FsFactory::getFileSystem($params, $name); } } }
function __construct($path = null, $fsInfo = 'default') { // maybe put some of this logic into FsFactory if ($fsInfo instanceof FileSystem) { $this->fs = $fsInfo; } else { if (is_array($fsInfo)) { $this->fs = FsFactory::getFileSystem($fsInfo, null); } else { if (is_string($fsInfo)) { $this->fs = FsModule::getFs($fsInfo); } else { trigger_error("unsupported file system designation type"); } } } // $this->path = $this->fs->instanceToRealPath($path); $this->path = $path; $this->res = null; }