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


PHP myContentStorage::getFileNameEdit方法代碼示例

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


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

示例1: generateFilePathArr

 /**
  * (non-PHPdoc)
  * @see lib/model/ISyncableFile#generateFilePathArr()
  */
 public function generateFilePathArr($sub_type, $version = null)
 {
     static::validateFileSyncSubType($sub_type);
     if ($sub_type == self::FILE_SYNC_ENTRY_SUB_TYPE_DATA) {
         $data = $this->getData();
         if ($this->getType() == entryType::MIX && (!$this->getData() || !strpos($this->getData(), 'xml'))) {
             $data .= ".xml";
         }
         $res = myContentStorage::getGeneralEntityPath("entry/data", $this->getIntId(), $this->getId(), $data, $version);
         //			$res = myContentStorage::getGeneralEntityPath("entry/data", $this->getIntId(), $this->getId(), $this->getData(), $version);
     } elseif ($sub_type == self::FILE_SYNC_ENTRY_SUB_TYPE_DATA_EDIT) {
         $res = myContentStorage::getFileNameEdit(myContentStorage::getGeneralEntityPath("entry/data", $this->getIntId(), $this->getId(), $this->getData(), $version));
     } elseif ($sub_type == self::FILE_SYNC_ENTRY_SUB_TYPE_THUMB) {
         $res = myContentStorage::getGeneralEntityPath("entry/bigthumbnail", $this->getIntId(), $this->getId(), $this->getThumbnail(), $version);
     } elseif ($sub_type == self::FILE_SYNC_ENTRY_SUB_TYPE_ARCHIVE) {
         $res = null;
         $data_path = myContentStorage::getGeneralEntityPath("entry/data", $this->getIntId(), $this->getId(), $this->getData(), $version);
         // assume the suffix is not the same as the one on the data
         $archive_path = dirname(str_replace("content/entry/", "archive/", $data_path)) . "/" . $this->getId();
         if ($this->getArchiveExtension()) {
             $res = $archive_path . "." . $this->getArchiveExtension();
         } else {
             $archive_pattern = $archive_path . ".*";
             $arc_files = glob(myContentStorage::getFSContentRootPath() . $archive_pattern);
             foreach ($arc_files as $full_path_name) {
                 // return the first file found
                 $res = $full_path_name;
                 break;
             }
             if (!$res) {
                 $res = $archive_pattern;
             }
         }
     } elseif ($sub_type == self::FILE_SYNC_ENTRY_SUB_TYPE_DOWNLOAD) {
         // in this case the $version  is used as the format
         $basename = kFile::getFileNameNoExtension($this->getData());
         $path = myContentStorage::getGeneralEntityPath("entry/download", $this->getIntId(), $this->getId(), $basename);
         $download_path = $path . ".{$version}";
         $res = $download_path;
     } else {
         $path = "entry/data";
         switch ($sub_type) {
             case self::FILE_SYNC_ENTRY_SUB_TYPE_ISM:
                 $basename = $this->generateBaseFileName(0, $this->getIsmVersion());
                 $basename .= '.ism';
                 break;
             case self::FILE_SYNC_ENTRY_SUB_TYPE_ISMC:
                 $basename = $this->generateBaseFileName(0, $this->getIsmVersion());
                 $basename .= '.ismc';
                 break;
             case self::FILE_SYNC_ENTRY_SUB_TYPE_CONVERSION_LOG:
                 $basename = $this->generateBaseFileName(0, $this->getIsmVersion());
                 $basename .= '.log';
                 break;
         }
         $res = myContentStorage::getGeneralEntityPath($path, $this->getIntId(), $this->getId(), $basename);
     }
     return array(myContentStorage::getFSContentRootPath(), $res);
 }
開發者ID:AdiTal,項目名稱:server,代碼行數:63,代碼來源:entry.php

示例2: getBestFileFlavor

 /**
 	will return the edit file name if exists, else the original one
 */
 public static function getBestFileFlavor($file_name)
 {
     $edit_file_name = myContentStorage::getFileNameEdit($file_name);
     if (file_exists($edit_file_name) && filesize($edit_file_name) > 0) {
         return $edit_file_name;
     }
     return $file_name;
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:11,代碼來源:myFlvHandler.class.php


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