コード例 #1
0
ファイル: statistic_service.php プロジェクト: vazahat/dudex
 /**
  * Returns class instance
  *
  * @return YNSOCIALBRIDGE_BOL_StatisticService
  */
 public static function getInstance()
 {
     if (!isset(self::$classInstance)) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
コード例 #2
0
ファイル: abstract.php プロジェクト: vazahat/dudex
 public function createOrUpdateStatistic($params = array())
 {
     $statistic = YNSOCIALBRIDGE_BOL_StatisticService::getInstance()->getTotalInviteOfDay($params);
     if ($statistic) {
         $statistic->inviteOfDay = $params['inviteOfDay'];
     } else {
         $statistic = new YNSOCIALBRIDGE_BOL_Statistic();
         $statistic->service = $params['service'];
         $statistic->userId = $params['userId'];
         $statistic->uid = $params['uid'];
         $statistic->inviteOfDay = $params['inviteOfDay'];
         $statistic->date = $params['date'];
     }
     YNSOCIALBRIDGE_BOL_StatisticService::getInstance()->save($statistic);
 }