本文整理匯總了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);
}