本文整理汇总了PHP中OW_Example类的典型用法代码示例。如果您正苦于以下问题:PHP OW_Example类的具体用法?PHP OW_Example怎么用?PHP OW_Example使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OW_Example类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: findList
public function findList($count)
{
$example = new OW_Example();
$example->setLimitClause(0, $count);
$example->setOrder('timeStamp DESC');
return $this->findListByExample($example);
}
示例2: findByUserId
public function findByUserId($userId, $first, $count)
{
$example = new OW_Example();
$example->andFieldEqual(self::USER_ID, (int) $userId);
$example->setLimitClause($first, $count);
return $this->findListByExample($example);
}
示例3: deleteCompletedFeatures
public function deleteCompletedFeatures()
{
$perDay = OW::getConfig()->getValue('profileprogressbar', 'per_day');
$example = new OW_Example();
$example->andFieldLessOrEqual(self::TIME_STAMP, strtotime("-{$perDay} day"));
return $this->deleteByExample($example);
}
示例4: sendExpiryEmail
public function sendExpiryEmail()
{
$config = OW::getConfig();
$subject = OW::getLanguage()->text('sponsors', 'reminder_subject');
$content = OW::getLanguage()->text('sponsors', 'reminder_content');
$sitemail = $config->getValue('base', 'site_email');
$sitename = $config->getValue('base', 'site_name');
$mails = array();
$example = new OW_Example();
$example->andFieldEqual('status', 1);
$example->andFieldGreaterThan('price', 0);
$sponsors = $this->dao->findListByExample($example);
foreach ($sponsors as $sponsor) {
$cutoffDay = $sponsor->validity - (int) OW::getConfig()->getValue('sponsors', 'cutoffDay');
if ((time() - $sponsor->timestamp) / 86400 > $cutoffDay && $cutoffDay > 0) {
$mail = OW::getMailer()->createMail();
$mail->addRecipientEmail($sponsor->email);
$mail->setSender($sitemail, $sitename);
$mail->setSubject($subject);
$mail->setHtmlContent($content);
$textContent = strip_tags(preg_replace("/\\<br\\s*[\\/]?\\s*\\>/", "\n", $content));
$mail->setTextContent($textContent);
$mails[] = $mail;
}
}
if (count($mails) > 0) {
OW::getMailer()->addListToQueue($mails);
}
}
示例5: deleteByGroupId
public function deleteByGroupId($groupId, $status = GHEADER_BOL_Cover::STATUS_ACTIVE)
{
$example = new OW_Example();
$example->andFieldEqual('groupId', $groupId);
$example->andFieldEqual('status', $status);
return $this->deleteByExample($example);
}
示例6: findByGroup
public function findByGroup($groupId)
{
$example = new OW_Example();
$example->andFieldEqual('groupId', $groupId);
$example->setOrder('timestamp DESC');
return $this->findListByExample($example);
}
示例7: findListByCategoryId
public function findListByCategoryId($id)
{
$example = new OW_Example();
$example->andFieldEqual('categoryId', $id);
$example->setOrder('`order` ASC');
return $this->findListByExample($example);
}
示例8: findPlaceScheme
/**
*
* @param int $placeId
* @param int $entityId
* @return BOL_PlaceScheme
*/
public function findPlaceScheme($placeId, $entityId)
{
$example = new OW_Example();
$example->andFieldEqual('placeId', $placeId);
$example->andFieldEqual('entityId', $entityId);
return $this->findObjectByExample($example);
}
示例9: deleteActivity
public function deleteActivity($questionId, $activityType, $activityId)
{
$example = new OW_Example();
$example->andFieldEqual('questionId', $questionId);
$example->andFieldEqual('activityType', $activityType);
$example->andFieldEqual('activityId', $activityId);
return $this->deleteByExample($example);
}
示例10: getAllPacks
/**
* Returns list of packs for account type
*
* @param $accountTypeId
* @return array
*/
public function getAllPacks($accountTypeId = null)
{
$example = new OW_Example();
if ($accountTypeId) {
$example->andFieldEqual('accountTypeId', $accountTypeId);
}
$example->setOrder('`price` ASC');
return $this->findListByExample($example);
}
示例11: getConfig
/**
* get Config
*
* @param string $name
* @return YNSOCIALBRIDGE_BOL_Apisetting
*/
public function getConfig($name)
{
if (!$name) {
return null;
}
$example = new OW_Example();
$example->andFieldEqual('apiName', $name);
return $this->findObjectByExample($example);
}
示例12: cleareExpiredNotifyLog
public function cleareExpiredNotifyLog($timestamp)
{
if (empty($timestamp)) {
return FALSE;
}
$example = new OW_Example();
$example->andFieldLessOrEqual(self::TIMESTAMP, $timestamp);
return $this->deleteByExample($example);
}
示例13: 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);
}
示例14: findUsersetting
public function findUsersetting($userId, $key)
{
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
if (!empty($key)) {
$example->andFieldEqual('key', $key);
}
return $this->findObjectByExample($example);
}
示例15: getUpdatedActions
public function getUpdatedActions()
{
$ex = new OW_Example();
$ex->andFieldEqual(PRIVACY_BOL_CronDao::IN_PROCESS, 0);
$ex->setOrder(PRIVACY_BOL_CronDao::TIMESTAMP);
$ex->setLimitClause(0, 500);
$objectList = $this->findListByExample($ex);
return $objectList;
}