/** * Fetches location info of the server this account is bound to (UK/US) * @param TxttoolsAccount $txttoolsAccount * @return mixed * @version 2015062901 * @since 2015062403 */ function getServerLocation($txttoolsAccount) { try { $requests = $this->XMLBuilder->buildBuildOptOutStatusCheckRequest($txttoolsAccount, array('+199999999')); $this->outboundConnector->sendData($requests, $txttoolsAccount); // status code 200 // the server does support opt-out checks return TxttoolsAccount::$US_LOCATION; } catch (Exception $ex) { // status code 500 causes an exception // the server does not support opt-out checks return TxttoolsAccount::$UK_LOCATION; } }
/** * Constructor - sets up builder options * @version 2013052301 * @since 2010090101 */ function __construct() { $this->encrypter = new MoodletxtEncryption(); self::$MAX_BLOCKS_PER_REQUEST = MoodletxtXMLConstants::$MESSAGES_PER_BATCH; }