当前位置: 首页>>代码示例>>PHP>>正文


PHP entryPeer::doSelectOne方法代码示例

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


在下文中一共展示了entryPeer::doSelectOne方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $prefix = $this->getObjectPrefix();
     $entry_id = $this->getPM("{$prefix}_id");
     $detailed = $this->getP("detailed", false);
     $version = $this->getP("version", false);
     $c = $this->getCriteria();
     if ($c == null) {
         $c = new Criteria();
         $c->add(entryPeer::ID, $entry_id);
         $c->add(entryPeer::MODERATION_STATUS, entry::ENTRY_MODERATION_STATUS_REJECTED, Criteria::NOT_EQUAL);
         $entry = entryPeer::doSelectOne($c);
     } else {
         $c->add(entryPeer::ID, $entry_id);
         $c->add(entryPeer::MODERATION_STATUS, entry::ENTRY_MODERATION_STATUS_REJECTED, Criteria::NOT_EQUAL);
         $entry = entryPeer::doSelectOne($c);
     }
     if (!$entry) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
     } else {
         if ($entry->getStatus() == entryStatus::IMPORT || $entry->getStatus() == entryStatus::PRECONVERT) {
             defPartnerservices2baseAction::disableCache();
         }
         if ($version) {
             $entry->setDesiredVersion($version);
         }
         $extra_fields = $this->getExtraFields();
         $level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
         if ($entry->getType() == entryType::MIX) {
             $extra_fields = array("allVersionsFormatted");
         }
         if ($extra_fields) {
             $this->addMsg("{$prefix}", objectWrapperBase::getWrapperClass($entry, $level, -3, 0, $extra_fields));
         } else {
             $this->addMsg("{$prefix}", objectWrapperBase::getWrapperClass($entry, $level));
         }
         $this->addData($entry);
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:39,代码来源:getentryAction.class.php

示例2: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $prefix = $this->getObjectPrefix();
     $entry_id_to_delete = $this->getPM("{$prefix}_id");
     $kshow_id_for_entry_id_to_delete = $this->getP("kshow_id");
     $c = $this->getCriteria();
     if ($c == null) {
         $entry_to_delete = entryPeer::retrieveByPK($entry_id_to_delete);
     } else {
         $entry_to_delete = entryPeer::doSelectOne($c);
     }
     if (!$entry_to_delete) {
         $this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id_to_delete);
         return;
     }
     if ($kshow_id_for_entry_id_to_delete != null) {
         // match the kshow_id
         if ($kshow_id_for_entry_id_to_delete != $entry_to_delete->getKshowId()) {
             $this->addError(APIErrors::CANNOT_DELETE_ENTRY, $entry_id_to_delete, $kshow_id_for_entry_id_to_delete);
             return;
         }
     }
     myEntryUtils::deleteEntry($entry_to_delete);
     /*
     	All move into myEntryUtils::deleteEntry
     
     	$entry_to_delete->setStatus ( entryStatus::DELETED );
     	
     	// make sure the moderation_status is set to moderation::MODERATION_STATUS_DELETE
     	$entry_to_delete->setModerationStatus ( moderation::MODERATION_STATUS_DELETE ); 
     	$entry_to_delete->setModifiedAt( time() ) ;
     	$entry_to_delete->save();
     	
     	myNotificationMgr::createNotification( kNotificationJobData::NOTIFICATION_TYPE_ENTRY_DELETE , $entry_to_delete );
     */
     $this->addMsg("deleted_" . $prefix, objectWrapperBase::getWrapperClass($entry_to_delete, objectWrapperBase::DETAIL_LEVEL_REGULAR));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:37,代码来源:deleteentryAction.class.php

示例3: getFriendsMakover

 public static function getFriendsMakover($subp_id, $puser_id)
 {
     $c = new Criteria();
     $c->add(PuserRolePeer::SUBP_ID, $subp_id);
     $c->add(PuserRolePeer::PUSER_ID, $puser_id);
     $c->add(PuserRolePeer::ROLE, PuserRole::PUSER_ROLE_RECIPIENT);
     $puserRoles = PuserRolePeer::doSelectJoinkshow($c);
     if (!$puserRoles) {
         return array(0, null);
     }
     $kshow = $puserRoles[0]->getkshow();
     $kshow_id = $kshow->getId();
     // fetch the roughcut which is not the default roughcut
     $c = new Criteria();
     $c->add(entryPeer::KSHOW_ID, $kshow_id);
     $c->add(entryPeer::TYPE, entryType::MIX);
     $c->add(entryPeer::ID, $kshow->getShowEntryId(), Criteria::NOT_EQUAL);
     $roughcut_entry = entryPeer::doSelectOne($c);
     return array($kshow_id, $roughcut_entry);
 }
开发者ID:DBezemer,项目名称:server,代码行数:20,代码来源:facebookUtils.class.php

示例4: getWebPlayableByEntryIdAction

 /**
  * Get web playable Flavor Assets for Entry
  * 
  * @action getWebPlayableByEntryId
  * @param string $entryId
  * @return KalturaFlavorAssetArray
  */
 public function getWebPlayableByEntryIdAction($entryId)
 {
     // entry could be "display_in_search = 2" - in that case we want to pull it although KN is off in services.ct for this action
     $c = new Criteria();
     $c->addAnd(entryPeer::ID, $entryId);
     $criterionPartnerOrKn = $c->getNewCriterion(entryPeer::PARTNER_ID, $this->getPartnerId());
     $criterionPartnerOrKn->addOr($c->getNewCriterion(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK));
     $c->addAnd($criterionPartnerOrKn);
     // there could only be one entry because the query is by primary key.
     // so using doSelectOne is safe.
     $dbEntry = entryPeer::doSelectOne($c);
     if (!$dbEntry) {
         throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
     }
     // if the entry does not belong to the partner but "display_in_search = 2"
     // we want to turn off the criteria over the flavorAssetPeer
     if ($dbEntry->getPartnerId() != $this->getPartnerId() && $dbEntry->getDisplayInSearch() == mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK) {
         flavorAssetPeer::setDefaultCriteriaFilter(null);
     }
     $flavorAssetsDb = flavorAssetPeer::retrieveReadyWebByEntryId($entryId);
     if (count($flavorAssetsDb) == 0) {
         throw new KalturaAPIException(KalturaErrors::NO_FLAVORS_FOUND);
     }
     // re-set default criteria to avoid fetching "private" flavors in laetr queries.
     // this should be also set in baseService, but we better do it anyway.
     flavorAssetPeer::setDefaultCriteriaFilter();
     $flavorAssets = KalturaFlavorAssetArray::fromDbArray($flavorAssetsDb);
     return $flavorAssets;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:36,代码来源:FlavorAssetService.php

示例5: getWebPlayableByEntryIdAction

 /**
  * Get web playable Flavor Assets for Entry
  * 
  * @action getWebPlayableByEntryId
  * @param string $entryId
  * @return KalturaFlavorAssetArray
  * 
  * @deprecated use baseEntry.getContextData instead
  */
 public function getWebPlayableByEntryIdAction($entryId)
 {
     // entry could be "display_in_search = 2" - in that case we want to pull it although KN is off in services.ct for this action
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     $c->addAnd(entryPeer::ID, $entryId);
     $criterionPartnerOrKn = $c->getNewCriterion(entryPeer::PARTNER_ID, $this->getPartnerId());
     $criterionPartnerOrKn->addOr($c->getNewCriterion(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK));
     $c->addAnd($criterionPartnerOrKn);
     // there could only be one entry because the query is by primary key.
     // so using doSelectOne is safe.
     $dbEntry = entryPeer::doSelectOne($c);
     if (!$dbEntry) {
         throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
     }
     $flavorAssetsDb = assetPeer::retrieveReadyWebByEntryId($entryId);
     if (count($flavorAssetsDb) == 0) {
         throw new KalturaAPIException(KalturaErrors::NO_FLAVORS_FOUND);
     }
     $flavorAssets = KalturaFlavorAssetArray::fromDbArray($flavorAssetsDb, $this->getResponseProfile());
     return $flavorAssets;
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:FlavorAssetService.php


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