예제 #1
0
파일: FsModule.php 프로젝트: rgigger/zinc
 function configure()
 {
     $fileSystems = $this->getConfig();
     if ($fileSystems) {
         foreach ($fileSystems as $name => $params) {
             self::$fileSystems[$name] = FsFactory::getFileSystem($params, $name);
         }
     }
 }
예제 #2
0
파일: File.php 프로젝트: rgigger/zinc
 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;
 }