本文整理汇总了PHP中OW_Example::andFieldInArray方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Example::andFieldInArray方法的具体用法?PHP OW_Example::andFieldInArray怎么用?PHP OW_Example::andFieldInArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Example
的用法示例。
在下文中一共展示了OW_Example::andFieldInArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: findActionPriceForAccountTypeList
/**
* @param $actionId
* @param $accTypeIdList
* @return array
*/
public function findActionPriceForAccountTypeList($actionId, $accTypeIdList)
{
$example = new OW_Example();
$example->andFieldEqual('actionId', $actionId);
$example->andFieldInArray('accountTypeId', $accTypeIdList);
return $this->findListByExample($example);
}
示例2: findByUserIdList
public function findByUserIdList(array $userIdList)
{
if (empty($userIdList)) {
return array();
}
$example = new OW_Example();
$example->andFieldInArray(self::USER_ID, $userIdList);
return $this->findListByExample($example);
}
示例3: getBalanceForUserList
public function getBalanceForUserList($ids)
{
if (!count($ids)) {
return array();
}
$ids = array_unique($ids);
$example = new OW_Example();
$example->andFieldInArray('userId', $ids);
return $this->findListByExample($example);
}
示例4: getCompletedFeaturesCount
public function getCompletedFeaturesCount($userId, array $features)
{
if (empty($userId) || count($features) === 0) {
return NULL;
}
$perDay = OW::getConfig()->getValue('profileprogressbar', 'per_day');
$example = new OW_Example();
$example->andFieldEqual(self::USER_ID, $userId);
$example->andFieldInArray(self::ENTITY_TYPE, $features);
$example->andFieldBetween(self::TIME_STAMP, strtotime("-{$perDay} day"), time());
return $this->countByExample($example);
}
示例5: findAccountTypeByNameList
public function findAccountTypeByNameList(array $accountTypeNameList)
{
if ($accountTypeNameList === null || !is_array($accountTypeNameList) || count($accountTypeNameList) === 0) {
return array();
}
$example = new OW_Example();
$example->andFieldInArray('name', $accountTypeNameList);
$example->setOrder('sortOrder');
return $this->findListByExample($example);
}
示例6: findBlockedList
public function findBlockedList($userId, $userIdList)
{
$example = new OW_Example();
$example->andFieldEqual(self::USER_ID, (int) $userId);
$example->andFieldInArray(self::BLOCKED_USER_ID, $userIdList);
return $this->findListByExample($example, BOL_UserBlockDao::CACHE_LIFE_TIME, array(BOL_UserBlockDao::CACHE_TAG_BLOCKED_USER));
}
示例7: findIdListByGroupIds
/**
* Returns topic id list
*
* @param array $groupIds
* @return array
*/
public function findIdListByGroupIds($groupIds)
{
$example = new OW_Example();
$example->andFieldInArray('groupId', $groupIds);
$query = "\n \tSELECT `id` FROM `" . $this->getTableName() . "`\n \t" . $example;
return $this->dbo->queryForColumnList($query);
}
示例8: findGuestsByGuestIds
public function findGuestsByGuestIds($userId, $guestIds)
{
if (empty($guestIds)) {
return array();
}
$example = new OW_Example();
$example->andFieldEqual("userId", $userId);
$example->andFieldInArray("guestId", $guestIds);
$example->setOrder("visitTimestamp DESC");
return $this->findListByExample($example);
}
示例9: cancel
/**
* Cancel friendship
*
* @param integer $requesterId
* @param integer $userId
*/
public function cancel($requesterId, $userId)
{
$ex = new OW_Example();
$ex->andFieldInArray('userId', array($userId, $requesterId))->andFieldInArray('friendId', array($userId, $requesterId));
$this->deleteByExample($ex);
}
示例10: findByUrlList
/**
* @param array $urlList
* @return array
*/
public function findByUrlList(array $urlList)
{
if (empty($urlList)) {
return array();
}
$urlList = array_unique($urlList);
$example = new OW_Example();
$example->andFieldInArray(self::URL, $urlList);
return $this->findListByExample($example);
}
示例11: findHiddenSections
public function findHiddenSections()
{
$example = new OW_Example();
$example->andFieldInArray('isHidden', 1);
return $this->findListByExample($example);
}
示例12: findFirstIdForRoles
/**
* @param $actionId
* @param $roles
* @throws InvalidArgumentException
* @return
*
*/
public function findFirstIdForRoles($actionId, $roles)
{
if ($actionId === null || (int) $actionId < 1) {
throw new InvalidArgumentException('actionId must not be null');
}
if ($roles === null || count($roles) < 1) {
return null;
}
$ex = new OW_Example();
$ex->andFieldEqual('actionId', $actionId);
$ex->andFieldInArray('roleId', $roles);
$ex->setLimitClause(1, 1);
return $this->findIdByExample($ex);
}
示例13: findTagsByLabel
/**
* Returns dto list for provided tag labels.
*
* @param array<string>$labels
* @return array
*/
public function findTagsByLabel($labels)
{
$example = new OW_Example();
$example->andFieldInArray(self::LABEL, $labels);
return $this->findListByExample($example);
}
示例14: findByActionIds
public function findByActionIds($actionIds)
{
if (empty($actionIds)) {
return array();
}
$example = new OW_Example();
$example->andFieldInArray('actionId', $actionIds);
return $this->findListByExample($example);
}
示例15: findListByQuestionList
public function findListByQuestionList($questionList)
{
$example = new OW_Example();
$example->andFieldInArray('question', $questionList);
return $this->findListByExample($example);
}