<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Class
 *
 * @author arix
 */
class Services {
//put your code here
    
   public $svaLog;
   public $tool;
   public $xwadDbAcess;
   public $smsAction;
    
    function __construct($svaLog, $tool, $xwadDbAcess,$smsAction) {

            $this->svaLog = $svaLog;
            $this->tool = $tool;
            $this->xwadDbAcess = $xwadDbAcess;
            $this->smsAction = $smsAction;

    }
    
    
    
    public function subscribeOffer($campaignId, $offerId, $msisdn) {
        
       $offerData = $this->xwadDbAcess->getOfferListById($offerId); 
       
       $this->smsAction->sendSMSOffers($msisdn, trim($offerData['short_code_v']), trim($offerData['keyword_v']));
       $this->xwadDbAcess->upldOfferStatistic($msisdn, $campaignId, $offerId );
        
        
    }
   
        
        
        
        
        
        
    
}




?>
