本文整理汇总了PHP中kuserPeer::retrieveByPk方法的典型用法代码示例。如果您正苦于以下问题:PHP kuserPeer::retrieveByPk方法的具体用法?PHP kuserPeer::retrieveByPk怎么用?PHP kuserPeer::retrieveByPk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kuserPeer
的用法示例。
在下文中一共展示了kuserPeer::retrieveByPk方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getkuser
/**
* Get the associated kuser object
*
* @param PropelPDO Optional Connection object.
* @return kuser The associated kuser object.
* @throws PropelException
*/
public function getkuser(PropelPDO $con = null)
{
if ($this->akuser === null && $this->kuser_id !== null) {
$this->akuser = kuserPeer::retrieveByPk($this->kuser_id);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->akuser->addKuserToUserRoles($this);
*/
}
return $this->akuser;
}
示例2: setCreatorKuserId
public function setCreatorKuserId($v)
{
$this->creator_kuser_id = $v;
// if we set the kuserId when not needed - this causes the kuser object to be reset (even if the joinKuser was done properly)
if ($this->getFromCustomData("creatorKuserId", null, null) == $v) {
// same value - don't set for nothing
return;
}
$this->putInCustomData("creatorKuserId", $v);
$kuser = kuserPeer::retrieveByPk($v);
if ($kuser) {
$this->setCreatorPuserId($kuser->getPuserId());
}
}
示例3: executeImpl
//.........这里部分代码省略.........
}
if ( $merge_entry_lists )
{
// if will join lists - no need to fetch entries twice
$this->addIgnoreIdList ($c , $aggrigate_id_list);
}
$this->addOffsetAndLimit ( $c ); // limit the number of the user's clips
if ( $disable_user_data )
$kuser_entry_list = entryPeer::doSelect( $c );
else
$kuser_entry_list = entryPeer::doSelectJoinkuser( $c );
*/
$this->addOffsetAndLimit($c);
// limit the number of the user's clips
if ($merge_entry_lists) {
// if will join lists - no need to fetch entries twice
$this->addIgnoreIdList($c, $aggrigate_id_list);
}
$kuser_entry_list = array();
$kuserIds = array_unique($kuserIds);
foreach ($kuserIds as $kuserId) {
$newC = clone $c;
$newC->addAnd(entryPeer::KUSER_ID, $kuserId);
if ($disable_user_data) {
$one_kuser_list = entryPeer::doSelect($newC);
} else {
$one_kuser_list = entryPeer::doSelectJoinkuser($newC);
}
$kuser_entry_list = array_merge($kuser_entry_list, $one_kuser_list);
}
// Since we are using 2 potential kusers, we might not have the obvious kuser from $puser_kuser
$strEntries = "";
if ($puser_kuser) {
$kuser = kuserPeer::retrieveByPk($puser_kuser->getKuserId());
if ($kuser) {
$strEntriesTemp = @unserialize($kuser->getPartnerData());
if ($strEntriesTemp) {
$strEntries .= $strEntriesTemp;
}
}
}
if ($apiv3Kuser) {
$strEntriesTemp = @unserialize($apiv3Kuser->getPartnerData());
if ($strEntriesTemp) {
$strEntries .= $strEntriesTemp;
}
}
if ($strEntries) {
$entries = explode(',', $strEntries);
$fixed_entry_list = array();
foreach ($entries as $entryId) {
$fixed_entry_list[] = trim($entryId);
}
$c = new Criteria();
$c->addAnd(entryPeer::TYPE, entryType::MEDIA_CLIP);
$c->addAnd(entryPeer::ID, $fixed_entry_list, Criteria::IN);
if ($merge_entry_lists) {
// if will join lists - no need to fetch entries twice
$this->addIgnoreIdList($c, $aggrigate_id_list);
}
if ($disable_user_data) {
$extra_user_entries = entryPeer::doSelect($c);
} else {
$extra_user_entries = entryPeer::doSelectJoinkuser($c);
}
if (count($extra_user_entries)) {