本文整理汇总了PHP中entry::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::setName方法的具体用法?PHP entry::setName怎么用?PHP entry::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entry
的用法示例。
在下文中一共展示了entry::setName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeImpl
protected function executeImpl(kshow $kshow, entry &$entry)
{
$this->res = "";
$likuser_id = $this->getLoggedInUserId();
if ($likuser_id != $entry->getKuserId()) {
// ERROR - attempting to update an entry which doesnt belong to the user
return "<xml>!</xml>";
//$this->securityViolation( $kshow->getId() );
}
$name = @$_GET["RoughcutName"];
$entry->setName($name);
$entry->save();
//myEntryUtils::createWidgetImage($entry, false);
$this->name = $name;
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:15,代码来源:setRoughcutNameAction.class.php
示例2: createEntry
/**
* This helps create special entries in a kshow - the show_entry & intro
* $type can be either entry::ENTRY_MEDIA_TYPE_SHOW (for the show_entry) or entry::ENTRY_MEDIA_TYPE_VIDEO (for the intro)
*/
public function createEntry($type, $kuser_id, $thumbnail = null, $entry_name = null)
{
// for invites we use the default invites from the kaltura gallery show
if ($type != entry::ENTRY_MEDIA_TYPE_SHOW) {
$kshow_type = $this->getType();
$intros = array(kshow::KSHOW_TYPE_MASHUP, kshow::KSHOW_TYPE_MUSIC_VIDEO, kshow::KSHOW_TYPE_HOWTO, kshow::KSHOW_TYPE_CALL_FOR_ACTION, kshow::KSHOW_TYPE_CONTEST, kshow::KSHOW_TYPE_GROUP_GREETING, kshow::KSHOW_TYPE_SPORTS, kshow::KSHOW_TYPE_DIGITAL_STORY, kshow::KSHOW_TYPE_GROUP_TRAVELOGUE);
$id = 0;
if (in_array($kshow_type, $intros)) {
$id = $kshow_type;
}
$id = 120 + $id;
$entry = entryPeer::retrieveByPK($id);
if ($entry) {
$this->setIntroId($entry->getId());
$this->m_intro = $entry;
}
return $entry;
}
$kshow = $this;
$entry = new entry();
$entry->setKshowId($kshow->getId());
$entry->setKuserId($kuser_id);
$entry->setCreatorKuserId($kuser_id);
if ($this->getPartnerId() !== null) {
$entry->setPartnerId($this->getPartnerId());
}
// inherit partner_id from kshow
if ($this->getSubpId() !== null) {
$entry->setSubpId($this->getSubpId());
}
// inherit subp_id from kshow
$entry->setStatus(entryStatus::READY);
if ($entry_name) {
$type_text = $entry_name;
} else {
$type_text = "Kaltura Video";
}
//$entry->setData ( "&kal_show.flv");
$entry->setThumbnail($thumbnail ? $thumbnail : "&kal_show.jpg");
$entry->setCreateThumb(false);
$entry->setType(entryType::MIX);
$entry->setMediaType(entry::ENTRY_MEDIA_TYPE_SHOW);
$entry->setEditorType(myMetadataUtils::METADATA_EDITOR_SIMPLE);
$entry->setName($type_text);
$entry->setTags($type_text . "," . $kshow->getTags());
$entry->save();
$this->setShowEntryId($entry->getId());
$this->m_show_entry = $entry;
return $entry;
}
示例3: handleEntry
//.........这里部分代码省略.........
$need_thumb = false;
}
} else {
if ($entry_thumbNum == 0) {
$entry_thumbNum = 1;
$thumbTime = 3;
if ($duration && $duration < $thumbTime * 1000) {
$thumbTime = floor($duration / 1000);
}
// for videos - thumbail should be created in post convert
// otherwise this code will fail if the thumbanil wasn't created successfully (roman)
//myFileConverter::autoCaptureFrame($entry_fullPath, $thumbTempPrefix."big_", $thumbTime, -1, -1);
$need_thumb = false;
$thumbBigFullPath = $thumbTempPrefix . "big_" . $entry_thumbNum . '.jpg';
}
}
//else select existing thumb ($entry_thumbNum already points to the right thumbnail)
}
}
$thumbFullPath = $thumbTempPrefix . $entry_thumbNum . '.jpg';
// if we arrived here both entry and thumbnail are valid we can now update the db
// in order to have the final entry_id and move its data to its final destination
if ($onlyExtractThumb) {
return $thumbFullPath;
}
}
$entry->setkshowId($this->kshow_id);
$entry->setKuserId($kuser_id);
$entry->setCreatorKuserId($kuser_id);
if ($this->partner_id != null) {
$entry->setPartnerId($this->partner_id);
$entry->setSubpId($this->subp_id);
}
$entry->setName($name ? $name : $this->getParam('entry_name'));
// $entry->setDescription('');//$this->getParam('entry_description'));
$entry->setType($type);
$entry->setMediaType($media_type);
$entry->setTags($tags ? $tags : $this->getParam('entry_tags'));
$entry->setSource($media_source);
$entry->setSourceId($this->getParam('entry_media_id'));
if ($media_date) {
$entry->setMediaDate($media_date);
}
// if source_link wasnt given use the entry_url HOWEVER, use it only if id doesnt contain @ which suggests the use of a password
$entry->setSourceLink($entry_source_link ? $entry_source_link : (strstr($entry_url, '@') ? "" : $entry_url));
if ($media_source == entry::ENTRY_MEDIA_SOURCE_FILE) {
$entry->setSourceLink("file:{$entry_fullPath}");
}
$entry->setLicenseType($this->getParam('entry_license'));
$entry->setCredit($this->getParam('entry_credit'));
$entry->setStatus($entry_status);
if ($duration !== null) {
$entry->setLengthInMsecs($duration);
}
if ($this->entry_id == 0) {
$entry->save();
$this->entry_id = $entry->getId();
}
// move thumb to final destination and set db entry
if ($media_type != entry::ENTRY_MEDIA_TYPE_AUDIO && $entry_thumbNum && $need_thumb) {
KalturaLog::debug("handleEntry: saving none audio thumb [{$thumbBigFullPath}]");
$entry->setThumbnail('.jpg');
if ($thumbBigFullPath) {
if ($media_type != entry::ENTRY_MEDIA_TYPE_IMAGE) {
myFileConverter::convertImage($thumbBigFullPath, $thumbFullPath);
}
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:67,代码来源:myInsertEntryHelper.class.php
示例4: createFriendsMakeover
public static function createFriendsMakeover($subp_id, $puser_id, $puser_ids)
{
list($kshow_id, $roughcut_entry) = self::getFriendsMakover($subp_id, $puser_id);
if (!$kshow_id) {
return array(0, 0, 0);
}
$kshow = kshowPeer::retrieveByPK($kshow_id);
if (!$roughcut_entry) {
$roughcut_entry = new entry();
$roughcut_entry->setKshowId($kshow->getId());
$roughcut_entry->setKuserId($kshow->getProducerId());
$roughcut_entry->setCreatorKuserId($kshow->getProducerId());
$roughcut_entry->setPartnerId($kshow->getPartnerId());
$roughcut_entry->setSubpId($kshow->getSubpId());
$roughcut_entry->setStatus(entryStatus::READY);
$roughcut_entry->setThumbnail("&kal_show.jpg");
$roughcut_entry->setType(entryType::MIX);
$roughcut_entry->setMediaType(entry::ENTRY_MEDIA_TYPE_SHOW);
$roughcut_entry->setName("Kaltura Video");
$roughcut_entry->setTags("");
$roughcut_entry->save();
}
list($entry_ids, $entry_puser_ids) = self::getMakeoverEntries($subp_id, $puser_id, $puser_ids);
$custom_data = implode(",", $entry_puser_ids);
if ($roughcut_entry->getFromCustomData("facelift", $subp_id) == $custom_data) {
// if the users list didnt change use the current roughcut
return array($kshow_id, $roughcut_entry->getId(), 0);
}
$c = new Criteria();
$c->add(entryPeer::ID, $entry_ids, Criteria::IN);
$entries = entryPeer::doSelect($c);
self::createKEditorMetadata($kshow, $roughcut_entry, $entries);
$roughcut_entry->putInCustomData("facelift", $custom_data, $subp_id);
$roughcut_entry->save();
return array($kshow_id, $roughcut_entry->getId(), 1);
}
示例5: createRecordedEntry
/**
* @param LiveEntry $dbEntry
* @return entry
*/
private function createRecordedEntry(LiveEntry $dbEntry, $mediaServerIndex)
{
$lock = kLock::create("live_record_" . $dbEntry->getId());
if ($lock && !$lock->lock(self::KLOCK_CREATE_RECORDED_ENTRY_GRAB_TIMEOUT, self::KLOCK_CREATE_RECORDED_ENTRY_HOLD_TIMEOUT)) {
return;
}
// If while we were waiting for the lock, someone has updated the recorded entry id - we should use it.
$dbEntry->reload();
if ($dbEntry->getRecordStatus() != RecordStatus::PER_SESSION && $dbEntry->getRecordedEntryId()) {
$lock->unlock();
$recordedEntry = entryPeer::retrieveByPK($dbEntry->getRecordedEntryId());
return $recordedEntry;
}
$recordedEntry = null;
try {
$recordedEntryName = $dbEntry->getName();
if ($dbEntry->getRecordStatus() == RecordStatus::PER_SESSION) {
$recordedEntryName .= ' ' . ($dbEntry->getRecordedEntryIndex() + 1);
}
$recordedEntry = new entry();
$recordedEntry->setType(entryType::MEDIA_CLIP);
$recordedEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_VIDEO);
$recordedEntry->setRootEntryId($dbEntry->getId());
$recordedEntry->setName($recordedEntryName);
$recordedEntry->setDescription($dbEntry->getDescription());
$recordedEntry->setSourceType(EntrySourceType::RECORDED_LIVE);
$recordedEntry->setAccessControlId($dbEntry->getAccessControlId());
$recordedEntry->setConversionProfileId($dbEntry->getConversionProfileId());
$recordedEntry->setKuserId($dbEntry->getKuserId());
$recordedEntry->setPartnerId($dbEntry->getPartnerId());
$recordedEntry->setModerationStatus($dbEntry->getModerationStatus());
$recordedEntry->setIsRecordedEntry(true);
$recordedEntry->setTags($dbEntry->getTags());
$recordedEntry->save();
$dbEntry->setRecordedEntryId($recordedEntry->getId());
$dbEntry->save();
$assets = assetPeer::retrieveByEntryId($dbEntry->getId(), array(assetType::LIVE));
foreach ($assets as $asset) {
/* @var $asset liveAsset */
$asset->incLiveSegmentVersion($mediaServerIndex);
$asset->save();
}
} catch (Exception $e) {
$lock->unlock();
throw $e;
}
$lock->unlock();
return $recordedEntry;
}
示例6: getReplacingEntry
protected static function getReplacingEntry($recordedEntry, $asset, $retries = 1)
{
$replacingEntryId = $recordedEntry->getReplacingEntryId();
$replacingEntry = null;
// in replacement
if ($replacingEntryId) {
$replacingEntry = entryPeer::retrieveByPKNoFilter($replacingEntryId);
// check if asset already ingested
$replacingAsset = assetPeer::retrieveByEntryIdAndParams($replacingEntryId, $asset->getFlavorParamsId());
if ($replacingAsset) {
KalturaLog::err('Asset with params [' . $asset->getFlavorParamsId() . '] already replaced');
return null;
}
} else {
$advancedOptions = new kEntryReplacementOptions();
$advancedOptions->setKeepManualThumbnails(true);
$recordedEntry->setReplacementOptions($advancedOptions);
$replacingEntry = new entry();
$replacingEntry->setType(entryType::MEDIA_CLIP);
$replacingEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_VIDEO);
$replacingEntry->setConversionProfileId($recordedEntry->getConversionProfileId());
$replacingEntry->setName($recordedEntry->getPartnerId() . '_' . time());
$replacingEntry->setKuserId($recordedEntry->getKuserId());
$replacingEntry->setAccessControlId($recordedEntry->getAccessControlId());
$replacingEntry->setPartnerId($recordedEntry->getPartnerId());
$replacingEntry->setSubpId($recordedEntry->getPartnerId() * 100);
$replacingEntry->setDefaultModerationStatus();
$replacingEntry->setDisplayInSearch(mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM);
$replacingEntry->setReplacedEntryId($recordedEntry->getId());
$replacingEntry->save();
$recordedEntry->setReplacingEntryId($replacingEntry->getId());
$recordedEntry->setReplacementStatus(entryReplacementStatus::APPROVED_BUT_NOT_READY);
$affectedRows = $recordedEntry->save();
if (!$affectedRows) {
$replacingEntry->delete();
$replacingEntry = null;
if ($retries) {
sleep(10);
$recordedEntry = entryPeer::retrieveByPKNoFilter($recordedEntry->getId());
return kFlowHelper::getReplacingEntry($recordedEntry, $asset, 0);
} else {
KalturaLog::err("Failed to update replacing entry");
return null;
}
}
}
return $replacingEntry;
}
示例7: createReplacigEntry
private static function createReplacigEntry($recordedEntry)
{
$advancedOptions = new kEntryReplacementOptions();
$advancedOptions->setKeepManualThumbnails(true);
$recordedEntry->setReplacementOptions($advancedOptions);
$replacingEntry = new entry();
$replacingEntry->setType(entryType::MEDIA_CLIP);
$replacingEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_VIDEO);
$replacingEntry->setConversionProfileId($recordedEntry->getConversionProfileId());
$replacingEntry->setName($recordedEntry->getPartnerId() . '_' . time());
$replacingEntry->setKuserId($recordedEntry->getKuserId());
$replacingEntry->setAccessControlId($recordedEntry->getAccessControlId());
$replacingEntry->setPartnerId($recordedEntry->getPartnerId());
$replacingEntry->setSubpId($recordedEntry->getPartnerId() * 100);
$replacingEntry->setDefaultModerationStatus();
$replacingEntry->setDisplayInSearch(mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM);
$replacingEntry->setReplacedEntryId($recordedEntry->getId());
$replacingEntry->save();
$recordedEntry->setReplacingEntryId($replacingEntry->getId());
$recordedEntry->setReplacementStatus(entryReplacementStatus::APPROVED_BUT_NOT_READY);
$affectedRows = $recordedEntry->save();
return $replacingEntry;
}