當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FilesystemInterface::setVisibility方法代碼示例

本文整理匯總了PHP中League\Flysystem\FilesystemInterface::setVisibility方法的典型用法代碼示例。如果您正苦於以下問題:PHP FilesystemInterface::setVisibility方法的具體用法?PHP FilesystemInterface::setVisibility怎麽用?PHP FilesystemInterface::setVisibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在League\Flysystem\FilesystemInterface的用法示例。


在下文中一共展示了FilesystemInterface::setVisibility方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setVisibility

 /**
  * @override
  * @inheritDoc
  */
 public function setVisibility($path, $visibility)
 {
     $ex = null;
     $result = false;
     try {
         $result = $this->fs->setVisibility($path, $visibility);
     } catch (Error $ex) {
     } catch (Exception $ex) {
     }
     if (!$result || $ex !== null) {
         throw new WriteException("File {$path} visibility could not be set to {$visibility}.", $ex);
     }
 }
開發者ID:kraken-php,項目名稱:framework,代碼行數:17,代碼來源:Filesystem.php

示例2: save

 /**
  * {@inheritdoc}
  */
 public function save($path, $content, $visibility = self::VISIBILITY_PRIVATE)
 {
     if (!$this->master->has($path)) {
         // File creation: remove from backup if it existed and warm-up both master and backup
         $this->createAndBackup($path, $content);
     } else {
         // File update: backup before writing
         $this->backupAndUpdate($path, $content);
     }
     if ($this->enableBackup) {
         $this->backup->setVisibility($path, $visibility);
     }
     $this->master->setVisibility($path, $visibility);
 }
開發者ID:acmephp,項目名稱:acmephp,代碼行數:17,代碼來源:Repository.php

示例3: setVisibility

 /**
  * Set the visibility for the given path.
  *
  * @param  string  $path
  * @param  string  $visibility
  * @return void
  */
 public function setVisibility($path, $visibility)
 {
     return $this->driver->setVisibility($path, $this->parseVisibility($visibility));
 }
開發者ID:Ceciceciceci,項目名稱:MySJSU-Class-Registration,代碼行數:11,代碼來源:FilesystemAdapter.php

示例4: setPrivate

 /**
  * Sets visibility of file or directory to private.
  *
  * @param string $path
  * @throws IoWriteException
  */
 public function setPrivate($path = '')
 {
     if (!$this->fs->setVisibility($path, static::VISIBILITY_PRIVATE)) {
         throw new IoWriteException("File {$path} visibility could not be set to private.");
     }
 }
開發者ID:khelle,項目名稱:surume,代碼行數:12,代碼來源:Filesystem.php

示例5: setVisibility

 /**
  * Set the visibility for a file.
  *
  * @param string $path       The path to the file.
  * @param string $visibility One of 'public' or 'private'.
  *
  * @return bool True on success, false on failure.
  */
 public function setVisibility($path, $visibility)
 {
     return $this->fileSystem->setVisibility($path, $visibility);
 }
開發者ID:graze,項目名稱:data-file,代碼行數:12,代碼來源:FilesystemWrapper.php


注:本文中的League\Flysystem\FilesystemInterface::setVisibility方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。