• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP entry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了entry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 !
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:33,代码来源:getMetadataAction.class.php


示例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);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:kMetadataMrssManager.php


示例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;
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:DocumentCreatedHandler.php


示例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);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:kContentDistributionMrssManager.php


示例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()}]");
 }
开发者ID:kubrickfr,项目名称:server,代码行数:30,代码来源:ThumbCuePoint.php


示例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));
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:30,代码来源:getentryroughcutsAction.class.php


示例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;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:Annotation.php


示例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}";
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:kMultiCentersBroadcastUrlManager.php


示例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);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:12,代码来源:kEdgeCastFlowManager.php


示例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;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:17,代码来源:VirusScanEntryFilter.php


示例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);
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:KalturaDataEntry.php


示例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();
 }
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:52,代码来源:class_entry_new.php


示例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;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:13,代码来源:DrmLicenseUtils.php


示例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;
 }
开发者ID:DBezemer,项目名称:server,代码行数:14,代码来源:UverseService.php


示例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


示例16: syncEntryEntitlementInfo

 public function syncEntryEntitlementInfo(entry $vodEntry, LiveEntry $liveEntry)
 {
     $entitledPusersEdit = $liveEntry->getEntitledPusersEdit();
     $entitledPusersPublish = $liveEntry->getEntitledPusersPublish();
     if (!$entitledPusersEdit && !$entitledPusersPublish) {
         return;
     }
     if ($entitledPusersEdit) {
         $vodEntry->setEntitledPusersEdit($entitledPusersEdit);
     }
     if ($entitledPusersPublish) {
         $vodEntry->setEntitledPusersPublish($entitledPusersPublish);
     }
     $vodEntry->save();
 }
开发者ID:AdiTal,项目名称:server,代码行数:15,代码来源:kObjectCreatedHandler.php


示例17: toObject

 public function toObject($dbObject = null, $skip = array())
 {
     if (is_null($dbObject)) {
         $dbObject = new entry();
     }
     // support filters array only if atleast one filters was specified
     if ($this->playlistType == KalturaPlaylistType::DYNAMIC && $this->filters && $this->filters->count > 0) {
         $this->filtersToPlaylistContentXml();
     }
     $dbObject->setType(entryType::PLAYLIST);
     parent::toObject($dbObject);
     $dbObject->setType(entryType::PLAYLIST);
     $dbObject->setDataContent($this->playlistContent);
     return $dbObject;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:15,代码来源:KalturaPlaylist.php


示例18: fixIsmManifestForReplacedEntry

 private function fixIsmManifestForReplacedEntry($path)
 {
     $fileData = file_get_contents($path);
     $xml = new SimpleXMLElement($fileData);
     $ismcFileName = $xml->head->meta['content'];
     list($ismcObjectId, $version, $subType, $isAsset, $entryId) = $this->parseObjectId($ismcFileName);
     if ($entryId != $this->entry->getId()) {
         //replacement flow
         $flavorAssets = assetPeer::retrieveByEntryIdAndStatus($this->entry->getId(), asset::ASSET_STATUS_READY);
         foreach ($flavorAssets as $asset) {
             if ($asset->hasTag(assetParams::TAG_ISM_MANIFEST)) {
                 list($replacingFileName, $fileName) = $this->getReplacedAndReplacingFileNames($asset, flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ISMC);
                 if ($replacingFileName && $fileName) {
                     $fileData = str_replace("content=\"{$replacingFileName}\"", "content=\"{$fileName}\"", $fileData);
                 }
             } else {
                 list($replacingFileName, $fileName) = $this->getReplacedAndReplacingFileNames($asset, flavorAsset::FILE_SYNC_ASSET_SUB_TYPE_ASSET);
                 if ($replacingFileName && $fileName) {
                     $fileData = str_replace("src=\"{$replacingFileName}\"", "src=\"{$fileName}\"", $fileData);
                 }
             }
         }
         return $fileData;
     } else {
         return $fileData;
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:27,代码来源:serveIsmAction.class.php


示例19: createPlayManifestURLs

 private function createPlayManifestURLs(KalturaEntryDistribution $entryDistribution, entry $entry, TvinciDistributionFeedHelper $feedHelper)
 {
     $distributionFlavorAssets = assetPeer::retrieveByIds(explode(',', $entryDistribution->flavorAssetIds));
     $videoAssetDataMap = $this->getVideoAssetDataMap();
     foreach ($videoAssetDataMap as $videoAssetData) {
         $tvinciAssetName = $videoAssetData[0];
         $playbackProtocol = $videoAssetData[1];
         $tags = $videoAssetData[2];
         $fileExt = $videoAssetData[3];
         $keys = array();
         $relevantTags = array();
         foreach ($distributionFlavorAssets as $distributionFlavorAsset) {
             foreach ($tags as $tag) {
                 if ($distributionFlavorAsset->isLocalReadyStatus() && $distributionFlavorAsset->hasTag($tag)) {
                     $key = $this->createFileCoGuid($entry->getEntryId(), $distributionFlavorAsset->getFlavorParamsId());
                     if (!in_array($key, $keys)) {
                         $keys[] = $key;
                     }
                     if (!in_array($tag, $relevantTags)) {
                         $relevantTags[] = $tag;
                     }
                 }
             }
         }
         if ($keys) {
             $fileCoGuid = implode(",", $keys);
             $tagFlag = implode(",", $relevantTags);
             $url = $this->getPlayManifestUrl($entry, $playbackProtocol, $tagFlag, $fileExt);
             $feedHelper->setVideoAssetData($tvinciAssetName, $url, $fileCoGuid);
         }
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:32,代码来源:KalturaTvinciDistributionJobProviderData.php


示例20: entryDeleted

 /**
  * @param entry $entry
  */
 protected function entryDeleted(entry $entry)
 {
     $this->syncableDeleted($entry->getId(), FileSyncObjectType::ENTRY);
     // delete flavor assets
     $c = new Criteria();
     $c->add(assetPeer::ENTRY_ID, $entry->getId());
     $c->add(assetPeer::STATUS, asset::FLAVOR_ASSET_STATUS_DELETED, Criteria::NOT_EQUAL);
     $c->add(assetPeer::DELETED_AT, null, Criteria::ISNULL);
     $assets = assetPeer::doSelect($c);
     foreach ($assets as $asset) {
         $asset->setStatus(asset::FLAVOR_ASSET_STATUS_DELETED);
         $asset->setDeletedAt(time());
         $asset->save();
     }
     $c = new Criteria();
     $c->add(assetParamsOutputPeer::ENTRY_ID, $entry->getId());
     $c->add(assetParamsOutputPeer::DELETED_AT, null, Criteria::ISNULL);
     $flavorParamsOutputs = assetParamsOutputPeer::doSelect($c);
     foreach ($flavorParamsOutputs as $flavorParamsOutput) {
         $flavorParamsOutput->setDeletedAt(time());
         $flavorParamsOutput->save();
     }
     $filter = new categoryEntryFilter();
     $filter->setEntryIdEqaul($entry->getId());
     kJobsManager::addDeleteJob($entry->getPartnerId(), DeleteObjectType::CATEGORY_ENTRY, $filter);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:29,代码来源:kObjectDeleteHandler.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP entryFilter类代码示例发布时间:2022-05-23
下一篇:
PHP entity_selector类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap