本文整理汇总了PHP中OW_Example::andFieldLike方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Example::andFieldLike方法的具体用法?PHP OW_Example::andFieldLike怎么用?PHP OW_Example::andFieldLike使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Example
的用法示例。
在下文中一共展示了OW_Example::andFieldLike方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInvitationByUserId
/**
* get All invitations with userId
*
* @param OW_Example
*
* @return array YNCONTACTIMPORTER_BOL_Invitation
*/
public function getInvitationByUserId($params = array())
{
$example = new OW_Example();
if (isset($params['count']) && $params['count']) {
$example->setLimitClause($params['first'], $params['count']);
}
if (isset($params['userId'])) {
$example->andFieldEqual('userId', $params['userId']);
}
if (isset($params['provider'])) {
$example->andFieldEqual('provider', $params['provider']);
} else {
$example->andFieldEqual('isUsed', 0);
}
if (isset($params['userId']) && empty($params['provider'])) {
// check queues
$emails = YNCONTACTIMPORTER_BOL_PendingService::getInstance()->getAllPendingEmailsByUserId(array('userId' => $params['userId']));
$socials = YNSOCIALBRIDGE_BOL_QueueService::getInstance()->getQueuesByUserId(array('userId' => $params['userId'], 'type' => 'sendInvite'));
$friendIds = array();
foreach ($emails as $email) {
$friendIds[] = $email['recipientEmail'];
}
foreach ($socials as $social) {
$arr_id = $arr = explode('/', $social['id']);
$friendIds[] = $arr_id[0];
}
if ($friendIds) {
$example->andFieldNotInArray('friendId', $friendIds);
}
}
if (isset($params['search']) && $params['search']) {
$example->andFieldLike('friendId', "%" . $params['search'] . "%");
}
$example->setOrder("`sentTime` DESC");
return $this->findListByExample($example);
}
示例2: suggestEntityAlbums
/**
* Get entity albums for suggest field
*
* @param string $entityType
* @param int $entityId
* @param string $query
* @return array of PHOTO_Bol_PhotoAlbum
*/
public function suggestEntityAlbums($entityType, $entityId, $query)
{
if (!$entityId) {
return false;
}
$example = new OW_Example();
$example->andFieldEqual('entityId', $entityId);
$example->andFieldEqual('entityType', $entityType);
$example->setOrder('`name` ASC');
if (strlen($query)) {
$example->andFieldLike('name', $query . '%');
}
$example->setLimitClause(0, 10);
return $this->findListByExample($example);
}
示例3: findByPluginKey
/**
*
* @param $pluginKey
* @return BOL_Component
*/
public function findByPluginKey($pluginKey)
{
if (empty($pluginKey)) {
return array();
}
$example = new OW_Example();
$example->andFieldLike('className', mb_strtoupper(preg_replace('/[_]/', '\\_', $pluginKey)) . '\\_%');
return $this->findListByExample($example);
}
示例4: suggestSection
/**
* Returns section list
*
* @param string $sectionName
* @return array of FORUM_BOL_Section
*/
public function suggestSection($sectionName)
{
$example = new OW_Example();
$example->andFieldEqual('isHidden', '0');
$example->andFieldLike('name', "{$sectionName}%");
return $this->findListByExample($example);
}