Beispiel #1
0
 /**
  * 
  * @return array
  */
 public function fileAccessProviders()
 {
     $ext = common_ext_ExtensionsManager::singleton()->getExtensionById('tao');
     if (is_null(self::$fileSystem)) {
         self::$fileSystem = tao_models_classes_FileSourceService::singleton()->addLocalSource('test FS', $ext->getConstant('DIR_VIEWS'));
     }
     return array(array(DirectWebSource::spawnWebsource(self::$fileSystem, $ext->getConstant('BASE_WWW'))), array(TokenWebSource::spawnWebsource(self::$fileSystem)), array(ActionWebSource::spawnWebsource(self::$fileSystem)));
 }
Beispiel #2
0
 /**
  * 
  * @return array
  */
 public function fileAccessProviders()
 {
     $ext = common_ext_ExtensionsManager::singleton()->getExtensionById('tao');
     if (is_null(self::$fileSystem)) {
         $serviceManager = ServiceManager::getServiceManager();
         $fsm = $serviceManager->get(FileSystemService::SERVICE_ID);
         $fsId = core_kernel_uri_UriService::singleton()->generateUri();
         $fsm->registerLocalFileSystem($fsId, $ext->getConstant('DIR_VIEWS'));
         $serviceManager->register(FileSystemService::SERVICE_ID, $fsm);
         self::$fileSystem = new core_kernel_fileSystem_FileSystem($fsId);
     }
     return array(array(DirectWebSource::spawnWebsource(self::$fileSystem->getUri(), $ext->getConstant('BASE_WWW'))), array(TokenWebSource::spawnWebsource(self::$fileSystem->getUri(), self::$fileSystem->getPath())), array(ActionWebSource::spawnWebsource(self::$fileSystem->getUri())));
 }