本文整理汇总了PHP中kshowPeer::retrieveByIndexedCustomData3方法的典型用法代码示例。如果您正苦于以下问题:PHP kshowPeer::retrieveByIndexedCustomData3方法的具体用法?PHP kshowPeer::retrieveByIndexedCustomData3怎么用?PHP kshowPeer::retrieveByIndexedCustomData3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kshowPeer
的用法示例。
在下文中一共展示了kshowPeer::retrieveByIndexedCustomData3方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$kshow_id = $this->getPM("kshow_id");
$detailed = $this->getP("detailed", false);
$kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
$kshow = null;
if ($kshow_id) {
$kshow = kshowPeer::retrieveByPK($kshow_id);
} elseif ($kshow_indexedCustomData3) {
$kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
}
if (!$kshow) {
$this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
} else {
$newKshow = myKshowUtils::shalowCloneById($kshow_id, $puser_kuser->getKuserId());
if (!$newKshow) {
$this->addError(APIErrors::KSHOW_CLONE_FAILED, $kshow_id);
} else {
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($newKshow, $level);
// TODO - remove this code when cache works properly when saving objects (in their save method)
$wrapper->removeFromCache("kshow", $newKshow->getId());
$this->addMsg("kshow", $wrapper);
}
}
}
示例2: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$kshow_id = $this->getPM("kshow_id");
$detailed = $this->getP("detailed", false);
$kshow_indexedCustomData3 = $this->getP("indexedCustomData3");
$kshow = null;
if ($kshow_id == kshow::KSHOW_ID_USE_DEFAULT) {
// see if the partner has some default kshow to add to
$kshow = myPartnerUtils::getDefaultKshow($partner_id, $subp_id, $puser_kuser);
if ($kshow) {
$kshow_id = $kshow->getId();
}
} elseif ($kshow_id) {
$kshow = kshowPeer::retrieveByPK($kshow_id);
} elseif ($kshow_indexedCustomData3) {
$kshow = kshowPeer::retrieveByIndexedCustomData3($kshow_indexedCustomData3);
}
if (!$kshow) {
$this->addError(APIErrors::INVALID_KSHOW_ID, $kshow_id);
} else {
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($kshow, $level);
// TODO - remove this code when cache works properly when saving objects (in their save method)
$wrapper->removeFromCache("kshow", $kshow_id);
$this->addMsg("kshow", $wrapper);
}
}