当前位置: 首页>>代码示例>>PHP>>正文


PHP kDataCenterMgr::incrementVersion方法代码示例

本文整理汇总了PHP中kDataCenterMgr::incrementVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP kDataCenterMgr::incrementVersion方法的具体用法?PHP kDataCenterMgr::incrementVersion怎么用?PHP kDataCenterMgr::incrementVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kDataCenterMgr的用法示例。


在下文中一共展示了kDataCenterMgr::incrementVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: calcObjectNewVersion

 public static function calcObjectNewVersion($object_id, $version, $object_type, $object_sub_type)
 {
     if (self::wasFileSyncLimitationReached($object_id, $version, $object_type, $object_sub_type)) {
         throw new kCoreException("File sync limitation per single object per day was reached for object id " . $object_id, kCoreException::MAX_FILE_SYNCS_FOR_OBJECT_PER_DAY_REACHED, $object_id);
     }
     return kDataCenterMgr::incrementVersion($version);
 }
开发者ID:DBezemer,项目名称:server,代码行数:7,代码来源:kFileSyncUtils.class.php

示例2: onAssetContentModified

 /**
  * Increment an internal version counter in order to invalidate cached thumbnails (see getThumbnailUrl())
  */
 public function onAssetContentModified()
 {
     $assetCacheVersion = kDataCenterMgr::incrementVersion($this->getAssetCacheVersion());
     $this->setAssetCacheVersion($assetCacheVersion);
     return $assetCacheVersion;
 }
开发者ID:AdiTal,项目名称:server,代码行数:9,代码来源:entry.php

示例3: incrementConfigVersion

 public function incrementConfigVersion()
 {
     $version = kDataCenterMgr::incrementVersion($this->getVersion());
     return $this->putInCustomData(self::CUSTOM_DATA_FIELD_CONFIG_VERSION, $version);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:5,代码来源:DistributionProfile.php

示例4: incrementDeleteDataVersion

 public function incrementDeleteDataVersion()
 {
     $version = kDataCenterMgr::incrementVersion($this->getDeleteDataVersion());
     return $this->putInCustomData(self::CUSTOM_DATA_FIELD_DELETE_DATA_VERSION, $version);
 }
开发者ID:DBezemer,项目名称:server,代码行数:5,代码来源:EntryDistribution.php

示例5: incrementPostFileVersion

 public function incrementPostFileVersion()
 {
     $version = kDataCenterMgr::incrementVersion($this->getPostFileVersion());
     return $this->putInCustomData(self::CUSTOM_DATA_POST_FILE_VERSION, $version);
 }
开发者ID:DBezemer,项目名称:server,代码行数:5,代码来源:HttpNotificationTemplate.php

示例6: generateRandomFileName

 /**
  * This function generates a random file name consisting of a random number and
  * a given file extension. If the new filename begins with a '&' or '^' character, the new
  * file is a kaltura template and it's appended to the previous filename UGC part.
  * This way the old UGC version is mantained. look above at getGeneralEntityPath documentation.
  * The random number is in the interval [100000,900000].
  * The 900000 upper limit provides space for storing 100000 versions
  * without expanding the file name length.
  * @param string $fileName = the original fileName from which the extension is cut.
  * @param string $previousFileName = in case a previous file exists, the old random is incremented
  * @return string the randomized file name
  */
 public static function generateRandomFileName($fileName, $previousFileName = NULL)
 {
     if ($fileName === null) {
         return null;
     }
     if ($previousFileName) {
         $c = strstr($previousFileName, '^') ? '^' : '&';
         $parts = explode($c, $previousFileName);
     } else {
         $parts = array('');
     }
     if (strlen($fileName) && ($fileName[0] == '&' || $fileName[0] == '^')) {
         return $parts[0] . $fileName;
     }
     if (strlen($parts[0])) {
         // a previous UGC found, increment version
         $version = kDataCenterMgr::incrementVersion(pathinfo($parts[0], PATHINFO_BASENAME));
     } else {
         $version = rand(myContentStorage::MIN_OBFUSCATOR_VALUE, myContentStorage::MAX_OBFUSCATOR_VALUE);
     }
     return $version . '.' . strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:myContentStorage.class.php

示例7: incrementResultsTransformerVersion

 public function incrementResultsTransformerVersion()
 {
     $version = kDataCenterMgr::incrementVersion($this->getResultsTransformerVersion());
     return $this->putInCustomData(self::CUSTOM_DATA_FIELD_RESULTS_TRANSFORMER_VERSION, $version);
 }
开发者ID:DBezemer,项目名称:server,代码行数:5,代码来源:GenericDistributionProviderAction.php


注:本文中的kDataCenterMgr::incrementVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。