<commit_before><?php

/**
 * SMSGlobal PHP API
 *
 * @author		<NAME> <<EMAIL>>
 * @link		http://stichoza.com/
 * @copyright	2013 Stichoza
 * @license		http://www.opensource.org/licenses/mit-license.php MIT
 * @version		1.0.0
 * @access		public
 */
class SMSGlobal {
	
	/**
	 * Username
	 * 
	 * @access	private
	 */
	private $username;
	
	/**
	 * Password
	 * 
	 * @access	private
	 */
	private $password;
	
	/**
	 * HTTP Request URL
	 * 
	 * @access	private
	 */
	private $url = "http://www.smsglobal.com/mobileworks/soapserver.php";
	
	
	public function validateLogin() {
		
	}
	public function renewTicket() {
		
	}
	public function logout() {
		
	}
	public function getPreference() {
		
	}
	public function getPreferenceSender() {
		
	}
	public function setPreferenceSender() {
		
	}
	public function getInterface() {
		
	}
	public function interface() {
		
	}
	public function getUpdate() {
		
	}
	public function sendSms() {
		
	}
	public function twoWaySendLongSms() {
		
	}
	public function twoWaySendSms() {
		
	}
	public function sendLongSms() {
		
	}
	public function sendSmsToGroup() {
		
	}
	public function sendSmsToList() {
		
	}
	public function balanceSms() {
		
	}
	public function balanceCheck() {
		
	}
	public function getBuddyList() {
		
	}
	public function addBuddy() {
		
	}
	public function updateBuddy() {
		
	}
	public function moveBuddy() {
		
	}
	public function copyBuddy() {
		
	}
	public function removeBuddy() {
		
	}
	public function deleteBuddy() {
		
	}
	public function addBuddyGroup() {
		
	}
	public function updateBuddyGroup() {
		
	}
	public function deleteBuddyGroup() {
		
	}
	public function addBuddyBulkList() {
		
	}
	public function updateBuddyBulkList() {
		
	}
	public function deleteBuddyBulkList() {
		
	}
	public function moveBuddyToList() {
		
	}
	public function copyBuddyToList() {
		
	}
	public function removeBuddyFromList() {
		
	}
	public function moveBuddyGroupToList() {
		
	}
	public function copyBuddyGroupToList() {
		
	}
	public function removeBuddyGroupFromList() {
		
	}
	public function moveListToList() {
		
	}
	public function copyListToList() {
		
	}
	public function removeListFromList() {
		
	}
	public function MTEmail() {
	
	}
}

?><commit_msg>Class constructor<commit_after><?php

/**
 * SMSGlobal PHP API
 *
 * @author		<NAME> <<EMAIL>>
 * @link		http://stichoza.com/
 * @copyright	2013 Stichoza
 * @license		http://www.opensource.org/licenses/mit-license.php MIT
 * @version		1.0.0
 * @access		public
 */
class SMSGlobal {

    private $ticket;
    private $soap;
    private $wdsl = "http://www.smsglobal.com/mobileworks/soapserver.php?wdsl";

    /**
     * SMSGlobal::__construct()
     * 
     * @param string $username E-mail or username (Optional)
     * @param string $password <PASSWORD> (Optional)
     * @return void
     * @access public
     */
    public function __construct($username, $password) {
        try {
            $this->soap = new SoapClient($this->wdsl);
        } catch (SoapFault $e) {
            print ($e->getMessage());
        }
        if (!empty($username) && !empty($password)) {
            $this->ticket = $this->validateLogin($username, $password);
        }
    }

    /**
     * SMSGlobal::sendRequest()
     * 
     * @param string $method
     * @param array $data
     * @return mixed
     * @access private
     */
    private function sendRequest($method, $data) {
        try {
            $response = $this->soap->$method($data);
        } catch (exception $e) {
            print ($e->getMessage());
            return null;
        }
        return $response;
    }

    /**
     * SMSGlobal::validateLogin()
     * 
     * @param string $u E-mail or username
     * @param string $p User's password
     * @return void
     * @access public
     * @throws Exception when username or password is not passed
     */
    public function validateLogin($u, $p) {
        if (empty($u) || empty($p))
            throw new Exception("Username and password not set");
        try {
        	$response = $this->sendRequest(
				"validateLogin",
				array(
					"username" => $u,
					"password" => $p
				)
			);
        } catch (Exeption $e) {
        	print($e->getMessage());
        }
        $this->ticket = $response["ticket"];
    }
    public function renewTicket() {

    }
    public function logout() {

    }
    public function getPreference() {

    }
    public function getPreferenceSender() {

    }
    public function setPreferenceSender() {

    }
    public function getInterface() {

    }
    public function interface() {

    }
    public function getUpdate() {

    }
    public function sendSms() {

    }
    public function twoWaySendLongSms() {

    }
    public function twoWaySendSms() {

    }
    public function sendLongSms() {

    }
    public function sendSmsToGroup() {

    }
    public function sendSmsToList() {

    }
    public function balanceSms() {

    }
    public function balanceCheck() {

    }
    public function getBuddyList() {

    }
    public function addBuddy() {

    }
    public function updateBuddy() {

    }
    public function moveBuddy() {

    }
    public function copyBuddy() {

    }
    public function removeBuddy() {

    }
    public function deleteBuddy() {

    }
    public function addBuddyGroup() {

    }
    public function updateBuddyGroup() {

    }
    public function deleteBuddyGroup() {

    }
    public function addBuddyBulkList() {

    }
    public function updateBuddyBulkList() {

    }
    public function deleteBuddyBulkList() {

    }
    public function moveBuddyToList() {

    }
    public function copyBuddyToList() {

    }
    public function removeBuddyFromList() {

    }
    public function moveBuddyGroupToList() {

    }
    public function copyBuddyGroupToList() {

    }
    public function removeBuddyGroupFromList() {

    }
    public function moveListToList() {

    }
    public function copyListToList() {

    }
    public function removeListFromList() {

    }
    public function MTEmail() {

    }
}

?>
{'fraction_non_alphanumeric': 0.11894127377998345, 'fraction_numerical': 0.002315963606286187, 'mean_word_length': 2.4004499437570304, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3784467', 'n_tokens_mistral': 2108, 'n_tokens_neox': 1887, 'n_words': 422}