本文整理汇总了PHP中kuserPeer::retrieveByPKNoFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP kuserPeer::retrieveByPKNoFilter方法的具体用法?PHP kuserPeer::retrieveByPKNoFilter怎么用?PHP kuserPeer::retrieveByPKNoFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kuserPeer
的用法示例。
在下文中一共展示了kuserPeer::retrieveByPKNoFilter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPuserId
public function getPuserId()
{
$kuser = kuserPeer::retrieveByPKNoFilter($this->getKuserId());
if (!$kuser) {
throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
}
return $kuser->getPuserId();
}
示例2: Criteria
<?php
const LIMIT = 500;
const INITIAL_CREATED_AT_VALUE = '2000-01-01 00:00:00';
require_once __DIR__ . "/../../../alpha/scripts/bootstrap.php";
$c = new Criteria();
$c->addAscendingOrderByColumn(kvotePeer::CREATED_AT);
$c->setLimit(LIMIT);
$createdAtValue = INITIAL_CREATED_AT_VALUE;
$kVotes = array(1);
while (!empty($kVotes)) {
$c->add(kvotePeer::CREATED_AT, $createdAtValue, Criteria::GREATER_THAN);
kvotePeer::setUseCriteriaFilter(false);
$kVotes = kvotePeer::doSelect($c);
kvotePeer::setUseCriteriaFilter(true);
foreach ($kVotes as $kVote) {
$kuserId = $kVote->getKuserId();
kuserPeer::setUseCriteriaFilter(false);
$kuser = kuserPeer::retrieveByPKNoFilter($kuserId);
kuserPeer::setUseCriteriaFilter(true);
if (!$kuser) {
KalturaLog::err("no user found with id {$kuserId}");
continue;
}
$puserId = $kuser->getPuserId();
$kVote->setPuserId($puserId);
$kVote->save();
}
KalturaLog::debug("created is - " . $kVote->getCreatedAt());
$createdAtValue = $kVote->getCreatedAt();
}