本文整理汇总了PHP中PartnerPeer::retrieveByPKs方法的典型用法代码示例。如果您正苦于以下问题:PHP PartnerPeer::retrieveByPKs方法的具体用法?PHP PartnerPeer::retrieveByPKs怎么用?PHP PartnerPeer::retrieveByPKs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartnerPeer
的用法示例。
在下文中一共展示了PartnerPeer::retrieveByPKs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPartnerListFromStats
private static function getPartnerListFromStats($stats_list)
{
$ids = self::getIds($stats_list, "PartnerId");
$partners = PartnerPeer::retrieveByPKs($ids);
$ordered_partners = self::attachStats($partners, $stats_list);
$partners_order_according_to_stats = array();
return $ordered_partners;
}
示例2: while
if ($startUpdatedAt) {
$criteria->add(PermissionPeer::UPDATED_AT, $startUpdatedAt, Criteria::GREATER_THAN);
}
$criteria->addAscendingOrderByColumn(PermissionPeer::PARTNER_ID);
$criteria->addSelectColumn(PermissionPeer::PARTNER_ID);
$criteria->setLimit($countLimitEachLoop);
$stmt = PermissionPeer::doSelectStmt($criteria, $con);
$partners = PartnerPeer::retrieveByPKs($stmt->fetchAll(PDO::FETCH_COLUMN));
while (count($partners)) {
foreach ($partners as $partner) {
/* @var $partner partner */
$partnerId = $partner->getId();
KalturaLog::debug("Set permission [{$permissionName}] for partner id [{$partnerId}]");
$dbPermission = PermissionPeer::getByNameAndPartner($permissionName, $partnerId);
if (!$dbPermission) {
$dbPermission = new Permission();
$dbPermission->setType(PermissionType::SPECIAL_FEATURE);
$dbPermission->setPartnerId($partnerId);
$dbPermission->setName($permissionName);
}
$dbPermission->setStatus(PermissionStatus::ACTIVE);
$dbPermission->save();
}
kMemoryManager::clearMemory();
$criteria->setOffset($offset);
$stmt = PermissionPeer::doSelectStmt($criteria, $con);
$partners = PartnerPeer::retrieveByPKs($stmt->fetchAll(PDO::FETCH_COLUMN));
usleep(100);
$offset += $countLimitEachLoop;
}
KalturaLog::debug("Done");