コード例 #1
0
 public static function setUpBeforeClass()
 {
     //get the config keys for the various tests
     self::$testKeys = new TestingKeys();
     PostmarkClientBase::$BASE_URL = self::$testKeys->BASE_URL ?: 'https://api.postmarkapp.com';
     date_default_timezone_set("UTC");
 }
コード例 #2
0
 /**
  * Create a new PostmarkClient.
  *
  * @param string $serverToken The token associated with "Server" you'd like to use to send/receive email from.
  * @param integer $timeout The timeout, in seconds to wait for an API call to complete before throwing an Exception.
  */
 function __construct($serverToken, $timeout = 30)
 {
     parent::__construct($serverToken, 'X-Postmark-Server-Token', $timeout);
 }
コード例 #3
0
 /**
  * Create a new PostmarkAdminClient.
  *
  * @param string $accountToken The Account Token used to access the Admin API.
  * This token is NOT the same as a Server Token. You can get your account token
  * from this page: https://postmarkapp.com/account/edit
  *
  * @param integer $timeout The timeout, in seconds, that API calls should wait before throwing an exception.
  */
 function __construct($accountToken, $timeout = 30)
 {
     parent::__construct($accountToken, "X-Postmark-Account-Token", $timeout);
 }