本文整理汇总了PHP中myContentStorage::generateRandomFileName方法的典型用法代码示例。如果您正苦于以下问题:PHP myContentStorage::generateRandomFileName方法的具体用法?PHP myContentStorage::generateRandomFileName怎么用?PHP myContentStorage::generateRandomFileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myContentStorage
的用法示例。
在下文中一共展示了myContentStorage::generateRandomFileName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setThumbnail
/**
* This function sets and returns a new path for a requested content entity.
* @param string $filename = the original fileName from which the extension is cut.
* @return string the content file name
*/
public function setThumbnail($filename, $force = false)
{
if ($force) {
$data = $filename;
} else {
$data = myContentStorage::generateRandomFileName($filename, $this->getThumbnail());
}
$this->onAssetContentModified();
parent::setThumbnail($data);
return $this->getThumbnail();
}
示例2: setPicture
public function setPicture($filename)
{
if (kCurrentContext::isApiV3Context()) {
parent::setPicture($filename);
return;
}
parent::setPicture(myContentStorage::generateRandomFileName($filename, $this->getPicture()));
}
示例3: setPicture
public function setPicture($filename)
{
if (defined("KALTURA_API_V3")) {
parent::setPicture($filename);
return;
}
parent::setPicture(myContentStorage::generateRandomFileName($filename, $this->getPicture()));
}
示例4: setSkinResourceByProperty
/**
* This function sets and returns a new path for a requested content entity.
* @param string $filename = the original fileName from which the extension is cut.
* @param string $prop_name = the property name to update in the skinContainer.
* @param string $$skin_container = should be passed to avoid serializing & deserailizing from $this->getSkin
* @return string the content file name
*/
public function setSkinResourceByProperty($filename, $prop_name, skinContainer &$skin_container)
{
$skin_container->setByName($prop_name, myContentStorage::generateRandomFileName($filename, $skin_container->getParamFromObject($prop_name)));
return $skin_container->getParamFromObject($prop_name);
}
示例5: setThumbnail
/**
* This function sets and returns a new path for a requested content entity.
* @param string $filename = the original fileName from which the extension is cut.
* @return string the content file name
*/
public function setThumbnail($filename, $force = false)
{
if ($force) {
$data = $filename;
} else {
$data = myContentStorage::generateRandomFileName($filename, $this->getThumbnail());
}
Baseentry::SetThumbnail($data);
return $this->getThumbnail();
}