本文整理汇总了PHP中entry类的典型用法代码示例。如果您正苦于以下问题:PHP entry类的具体用法?PHP entry怎么用?PHP entry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了entry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeImpl
/**
* Executes addComment action, which returns a form enabling the insertion of a comment
* The request may include 1 fields: entry id.
*/
protected function executeImpl(kshow $kshow, entry &$entry)
{
$version = @$_REQUEST["version"];
// it's a path on the disk
if (kString::beginsWith($version, ".")) {
// someone is trying to hack in the system
return sfView::ERROR;
}
// in case we're making a roughcut out of a regular invite, we start from scratch
if ($entry->getMediaType() != entry::ENTRY_MEDIA_TYPE_SHOW || $entry->getDataPath($version) === null) {
$this->xml_content = "<xml></xml>";
return;
}
// fetch content of file from disk - it should hold the XML
$file_name = myContentStorage::getFSContentRootPath() . "/" . $entry->getDataPath($version);
//echo "[$file_name]";
if (kString::endsWith($file_name, "xml")) {
if (file_exists($file_name)) {
$this->xml_content = kFile::getFileContent($file_name);
// echo "[" . $this->xml_content . "]" ;
} else {
$this->xml_content = "<xml></xml>";
}
myMetadataUtils::updateEntryForPending($entry, $version, $this->xml_content);
} else {
return sfView::ERROR;
}
// this is NOT an xml file we are looking for !
}
示例2: contribute
/**
* @param entry $entry
* @param SimpleXMLElement $mrss
* @return SimpleXMLElement
*/
public function contribute(entry $entry, SimpleXMLElement $mrss)
{
$metadatas = MetadataPeer::retrieveAllByObject(Metadata::TYPE_ENTRY, $entry->getId());
foreach ($metadatas as $metadata) {
$this->contributeMetadata($metadata, $mrss);
}
}
示例3: entryCreated
/**
* @param entry $object
* @return bool true if should continue to the next consumer
*/
public function entryCreated(entry $object)
{
$mediaType = null;
if ($object->getType() == entryType::AUTOMATIC) {
$mediaType = $object->getMediaType();
if (isset(self::$fileExtensions[$mediaType])) {
$object->setType(entryType::DOCUMENT);
} elseif (is_null($mediaType) || $mediaType == entry::ENTRY_MEDIA_TYPE_ANY || $mediaType == entry::ENTRY_MEDIA_TYPE_AUTOMATIC) {
$this->setDocumentType($object);
}
}
if ($object->getType() != entryType::DOCUMENT) {
KalturaLog::info("entry id [" . $object->getId() . "] type [" . $object->getType() . "]");
return true;
}
if (is_null($mediaType) || $mediaType == entry::ENTRY_MEDIA_TYPE_ANY || $mediaType == entry::ENTRY_MEDIA_TYPE_AUTOMATIC) {
$this->setDocumentType($object);
}
if ($object instanceof DocumentEntry) {
KalturaLog::info("entry id [" . $object->getId() . "] already handled");
return true;
}
if ($object->getConversionProfileId()) {
$object->setStatus(entryStatus::PRECONVERT);
$object->save();
}
return true;
}
示例4: contribute
/**
* @param entry $entry
* @param SimpleXMLElement $mrss
* @return SimpleXMLElement
*/
public function contribute(entry $entry, SimpleXMLElement $mrss)
{
$entryDistributions = EntryDistributionPeer::retrieveByEntryId($entry->getId());
foreach ($entryDistributions as $entryDistribution) {
$this->contributeDistribution($entryDistribution, $mrss);
}
}
示例5: copyAssets
public function copyAssets(entry $toEntry, ThumbCuePoint $toCuePoint, $adjustedStartTime = null)
{
$timedThumbAsset = assetPeer::retrieveById($this->getAssetId());
if (!$timedThumbAsset) {
KalturaLog::debug("Can't retrieve timedThumbAsset with id: {$this->getAssetId()}");
return;
}
// Offset the startTime according to the duration gap between the live and VOD entries
if (!is_null($adjustedStartTime)) {
$toCuePoint->setStartTime($adjustedStartTime);
}
$toCuePoint->save();
// Must save in order to produce an id
$timedThumbAsset->setCuePointID($toCuePoint->getId());
// Set the destination cue point's id
$timedThumbAsset->setCustomDataObj();
// Write the cached custom data object into the thumb asset
// Make a copy of the current thumb asset
// copyToEntry will create a filesync softlink to the original filesync
$toTimedThumbAsset = $timedThumbAsset->copyToEntry($toEntry->getId(), $toEntry->getPartnerId());
$toCuePoint->setAssetId($toTimedThumbAsset->getId());
$toCuePoint->save();
// Restore the thumb asset's prev. cue point id (for good measures)
$timedThumbAsset->setCuePointID($this->getId());
$timedThumbAsset->setCustomDataObj();
// Save the destination entry's thumb asset
$toTimedThumbAsset->setCuePointID($toCuePoint->getId());
$toTimedThumbAsset->save();
KalturaLog::log("Saved cue point [{$toCuePoint->getId()}] and timed thumb asset [{$toTimedThumbAsset->getId()}]");
}
示例6: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$prefix = $this->getObjectPrefix();
$entry_id = $this->getPM("{$prefix}_id");
$detailed = false;
//$this->getP ( "detailed" , false );
$version = $this->getP("version", false);
$entry = new entry();
$entry->setId($entry_id);
/*
$c = $this->getCriteria();
if ( $c == null )
{
$entry = entryPeer::retrieveByPK( $entry_id );
}
else
{
$c->add ( entryPeer::ID , $entry_id );
$entry = entryPeer::doSelectOne( $c );
}
*/
if (!$entry) {
$this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
} else {
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$roughcuts = $entry->getRoughcuts();
$this->addMsg("count", count($roughcuts));
$this->addMsg("roughcuts", objectWrapperBase::getWrapperClass($roughcuts, $level));
}
}
示例7: hasPermissionToCopyToEntry
/**
* @param entry $entry
* @return bool true if cuepoints should be copied to given entry
*/
public function hasPermissionToCopyToEntry(entry $entry)
{
if (!$entry->getIsTemporary() && PermissionPeer::isValidForPartner(AnnotationCuePointPermissionName::COPY_ANNOTATIONS_TO_CLIP, $entry->getPartnerId())) {
return true;
}
if ($entry->getIsTemporary() && !PermissionPeer::isValidForPartner(AnnotationCuePointPermissionName::DO_NOT_COPY_ANNOTATIONS_TO_TRIMMED_ENTRY, $entry->getPartnerId())) {
return true;
}
return false;
}
示例8: getBroadcastUrl
public function getBroadcastUrl(entry $entry, $mediaServerIndex)
{
$mediaServerConfig = kConf::get($mediaServerIndex, 'broadcast');
$app = $mediaServerConfig['application'];
$partnerId = $this->partnerId;
$url = "rtmp://{$partnerId}.{$mediaServerIndex}." . kConf::get('domain', 'broadcast');
$entryId = $entry->getId();
$token = $entry->getStreamPassword();
return "{$url}/{$app}/p/{$partnerId}/e/{$entryId}/i/{$mediaServerIndex}/t/{$token}";
}
示例9: purgeEntryFromEdgeCast
private static function purgeEntryFromEdgeCast(entry $entry)
{
// get partner
$partnerId = $entry->getPartnerId();
$partner = PartnerPeer::retrieveByPK($partnerId);
if (!$partner) {
KalturaLog::err('Cannot find partner with id [' . $partnerId . ']');
return false;
}
$mediaTypePathList = array(array('MediaType' => self::EDGE_SERVICE_HTTP_LARGE_OBJECT_MEDIA_TYPE, 'MediaPath' => $entry->getDownloadUrl()), array('MediaType' => self::EDGE_SERVICE_HTTP_SMALL_OBJECT_MEDIA_TYPE, 'MediaPath' => $entry->getThumbnailUrl()));
return self::purgeFromEdgeCast($mediaTypePathList, $partner);
}
示例10: matches
/**
* This function checks if the entry type matches the filter, and return 'true' or 'false' accordingly.
* @param entry $entry
* @return boolean
*/
public function matches(entry $entry)
{
// check if type equals
if ($entry->getType() == $this->get('_eq_type')) {
return true;
}
// check if type in
if (in_array($entry->getType(), explode(',', $this->get('_in_type')))) {
return true;
}
return false;
}
示例11: toObject
public function toObject($dbDataEntry = null, $propsToSkip = array())
{
if (is_null($dbDataEntry)) {
$dbDataEntry = new entry();
}
if ($this->retrieveDataContentByGet === null) {
$this->retrieveDataContentByGet = 1;
}
//$dbDataEntry->putInCustomData('retrieveDataContentByGet',$this->retrieveDataContentByGet);
$dbDataEntry->setRetrieveDataContentByGet($this->retrieveDataContentByGet);
return parent::toObject($dbDataEntry, $propsToSkip);
}
示例12: load_new
function load_new()
{
$this->load_read();
$pid = $_SESSION['userid'];
$query = 'select
forum_relation.level,
forum.id,
forum.rel_to,
forum.author,
person.first_name as author_first_name,
person.last_name as author_last_name,
forum.created,
forum.topic,
forum.text,
rights_person.rights as rights_person,
pg.gid,
rights_group.rights as rights_group
from forum_relation
left join forum on
forum_relation.answer=forum.id
left join person on
forum.author=person.id
left join forum_rights_person as rights_person on
forum.id=rights_person.entry_id
and rights_person.person_id="' . $pid . '"
left join forum_rights_group as rights_group on
rights_person.rights is null
and forum.id=rights_group.entry_id
left join pg on
rights_group.group_id=pg.gid
and pg.pid="' . $pid . '"
where
forum.created>"' . $_SESSION['last_login'] . '"';
$query .= 'order by
forum_relation.level,
forum.created';
$result = $this->db->query($query);
while ($data = mysql_fetch_array($result)) {
$level = $data['level'];
$id = $data['id'];
$entry =& $this->entries[$id];
if (!isset($entry)) {
$entry = new entry();
$entry->set_data($data);
if (!isset($this->read[$id])) {
$entry->new = true;
}
}
$entry->add_rights_row($data);
}
$this->index_new();
}
示例13: calculateExpirationDate
public static function calculateExpirationDate(DrmPolicy $policy, entry $entry)
{
$beginDate = time();
switch ($policy->getLicenseExpirationPolicy()) {
case DrmLicenseExpirationPolicy::FIXED_DURATION:
$expirationDate = $beginDate + dateUtils::DAY * $policy->getDuration();
break;
case DrmLicenseExpirationPolicy::ENTRY_SCHEDULING_END:
$expirationDate = $entry->getEndDate();
break;
}
return $expirationDate;
}
示例14: handleEntry
protected function handleEntry($context, $feed, entry $entry, Entrydistribution $entryDistribution)
{
$fields = $this->profile->getAllFieldValues($entryDistribution);
$flavorAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getFlavorAssetIds()));
$flavorAsset = reset($flavorAssets);
$flavorAssetRemoteUrl = $entryDistribution->getFromCustomData(UverseEntryDistributionCustomDataField::REMOTE_ASSET_URL);
$thumbAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->getThumbAssetIds()));
$xml = $feed->getItemXml($fields, $flavorAsset, $flavorAssetRemoteUrl, $thumbAssets);
// we want to find the newest update time between all entries
if ($entry->getUpdatedAt(null) > $context->lastBuildDate) {
$context->lastBuildDate = $entry->getUpdatedAt(null);
}
return $xml;
}
示例15: 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