/** * Returns an instance of class (singleton pattern implementation). * * @return NOTIFICATIONS_BOL_SendQueueDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function findUserIdListForSend($count) { $list = $this->sendQueueDao->findList($count); if (empty($list)) { return array(); } $userIds = array(); $ids = array(); foreach ($list as $item) { $ids[] = $item->id; $userIds[] = $item->userId; } $this->sendQueueDao->deleteByIdList($ids); return $userIds; }