本文整理汇总了PHP中kuserPeer::getCriteriaFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP kuserPeer::getCriteriaFilter方法的具体用法?PHP kuserPeer::getCriteriaFilter怎么用?PHP kuserPeer::getCriteriaFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kuserPeer
的用法示例。
在下文中一共展示了kuserPeer::getCriteriaFilter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultCriteriaFilter
public static function getDefaultCriteriaFilter()
{
return kuserPeer::getCriteriaFilter();
}
示例2: updatePuserIdsForEntries
public static function updatePuserIdsForEntries($entries)
{
if (!$entries) {
return;
}
// get the whole list of kuser_ids
$partner_kuser_list = array();
kuserPeer::getCriteriaFilter()->disable();
PuserKuserPeer::getCriteriaFilter()->disable();
foreach ($entries as &$entry) {
$pid = $entry->getPartnerId();
if (!isset($partner_kuser_list[$pid])) {
$partner_kuser_ids = array();
} else {
$partner_kuser_ids = $partner_kuser_list[$pid];
}
//print_r ( $entry );
$kuser_id = $entry->getKuserId();
$partner_kuser_ids[$kuser_id] = $kuser_id;
$partner_kuser_list[$pid] = $partner_kuser_ids;
}
// the kuser_id is unique across partners
$kuser_list = array();
$puser_id = null;
foreach ($partner_kuser_list as $pid => $kuser_ids) {
$puser_kuser_list = PuserKuserPeer::getPuserIdFromKuserIds($pid, $kuser_ids);
// builf a map where the key is kuser_id for fast fetch
foreach ($puser_kuser_list as $puser_kuser) {
$kuser_id = $puser_kuser->getKuserId();
$puser_id = $puser_kuser->getPuserId();
$kuser_list[$kuser_id] = $puser_id;
}
}
foreach ($entries as $entry) {
$kuser_id = $entry->getKuserId();
if (isset($kuser_list[$kuser_id])) {
$puser_id = $kuser_list[$kuser_id];
}
if ($puser_id) {
$entry->tempSetPuserId($puser_id);
}
}
kuserPeer::getCriteriaFilter()->enable();
PuserKuserPeer::getCriteriaFilter()->enable();
}
示例3: getDefaultCriteriaFilter
protected function getDefaultCriteriaFilter()
{
return kuserPeer::getCriteriaFilter();
}
示例4: attachCriteriaFilter
/**
* the filterCriteria will filter out all the doSelect methods - ONLY if the filter is turned on.
* IMPORTANT - the filter is turend on by default and when switched off - should be turned on again manually .
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
*/
protected static function attachCriteriaFilter(Criteria $criteria)
{
kuserPeer::getCriteriaFilter()->applyFilter($criteria);
}