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); }
public function cleareExpiredNotifyLog($timestamp) { if (empty($timestamp)) { return FALSE; } $example = new OW_Example(); $example->andFieldLessOrEqual(self::TIMESTAMP, $timestamp); return $this->deleteByExample($example); }
public function findNotificationList($userId, $beforeStamp, $ignoreIds, $count) { $example = new OW_Example(); $example->andFieldEqual('userId', $userId); $example->andFieldLessOrEqual('timeStamp', $beforeStamp); if (!empty($ignoreIds)) { $example->andFieldNotInArray('id', $ignoreIds); } $example->setLimitClause(0, $count); $example->setOrder('viewed, timeStamp DESC'); return $this->findListByExample($example); }
public function findPreviousSection(BOL_QuestionSection $section) { if ($section === null) { return null; } $example = new OW_Example(); $example->andFieldLessOrEqual('sortOrder', (int) $section->sortOrder); $example->andFieldEqual('isHidden', 0); $example->andFieldNotEqual('name', 'about_my_match'); $example->andFieldNotEqual('name', $section->name); $example->setOrder(' sortOrder desc '); return $this->findObjectByExample($example); }
public function findListAfterAvatarId($avatarId, $count, $includes = true) { $avatar = $this->findLastByAvatarId($avatarId); if ($avatar === null) { return array(); } $example = new OW_Example(); $example->andFieldEqual("userId", $avatar->userId); if ($includes) { $example->andFieldLessOrEqual("timeStamp", $avatar->timeStamp); } else { $example->andFieldLessThan("timeStamp", $avatar->timeStamp); } $example->setOrder("`timeStamp` DESC"); $example->setLimitClause(0, $count); return $this->findListByExample($example); }
public function findExpiredDate($timestamp) { $example = new OW_Example(); $example->andFieldLessOrEqual(self::TIMESTAMP, $timestamp); return $this->findListByExample($example); }
/** * @param int $startTime */ public function deleteActionSetByTimestamp($timestamp) { $ex = new OW_Example(); $ex->andFieldLessOrEqual('timestamp', (int) $timestamp); $this->deleteByExample($ex); }
public function deleteExpiredEntities() { $example = new OW_Example(); $example->andFieldLessOrEqual(self::EXPIRATION_TS, time()); $this->deleteByExample($example); }
public function deleteByCreatedStamp($stamp) { $timeStamp = (int) $stamp; $example = new OW_Example(); $example->andFieldLessOrEqual('createStamp', $timeStamp); $this->deleteByExample($example); }
/** * Returns post number in the topic * * @param int $topicId * @param int $postId * @return int */ public function findPostNumber($topicId, $postId) { $example = new OW_Example(); $example->andFieldEqual('topicId', $topicId); $example->andFieldLessOrEqual('id', $postId); return $this->countByExample($example); }
public function findEntityInvitationCount($entityType, $entityId) { $example = new OW_Example(); $example->andFieldEqual('entityType', $entityType); $example->andFieldLessOrEqual('entityId', $entityId); return $this->countByExample($example); }