本文整理汇总了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);
}
示例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;
}
示例3: incrementConfigVersion
public function incrementConfigVersion()
{
$version = kDataCenterMgr::incrementVersion($this->getVersion());
return $this->putInCustomData(self::CUSTOM_DATA_FIELD_CONFIG_VERSION, $version);
}
示例4: incrementDeleteDataVersion
public function incrementDeleteDataVersion()
{
$version = kDataCenterMgr::incrementVersion($this->getDeleteDataVersion());
return $this->putInCustomData(self::CUSTOM_DATA_FIELD_DELETE_DATA_VERSION, $version);
}
示例5: incrementPostFileVersion
public function incrementPostFileVersion()
{
$version = kDataCenterMgr::incrementVersion($this->getPostFileVersion());
return $this->putInCustomData(self::CUSTOM_DATA_POST_FILE_VERSION, $version);
}
示例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));
}
示例7: incrementResultsTransformerVersion
public function incrementResultsTransformerVersion()
{
$version = kDataCenterMgr::incrementVersion($this->getResultsTransformerVersion());
return $this->putInCustomData(self::CUSTOM_DATA_FIELD_RESULTS_TRANSFORMER_VERSION, $version);
}