Pingpp.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. namespace Pingpp;
  3. class Pingpp
  4. {
  5. /**
  6. * @var string The Pingpp API key to be used for requests.
  7. */
  8. public static $apiKey;
  9. /**
  10. * @var string The base URL for the Pingpp API.
  11. */
  12. public static $apiBase = 'https://api.pingxx.com';
  13. /**
  14. * @var string|null The version of the Pingpp API to use for requests.
  15. */
  16. public static $apiVersion = "2016-07-20";
  17. /**
  18. * @var boolean Defaults to true.
  19. */
  20. public static $verifySslCerts = true;
  21. const VERSION = '2.1.5';
  22. /**
  23. * @var string The private key path to be used for signing requests.
  24. */
  25. public static $privateKeyPath;
  26. /**
  27. * @var string The PEM formatted private key to be used for signing requests.
  28. */
  29. public static $privateKey;
  30. /**
  31. * @return string The API key used for requests.
  32. */
  33. public static function getApiKey()
  34. {
  35. return self::$apiKey;
  36. }
  37. /**
  38. * Sets the API key to be used for requests.
  39. *
  40. * @param string $apiKey
  41. */
  42. public static function setApiKey($apiKey)
  43. {
  44. self::$apiKey = $apiKey;
  45. }
  46. /**
  47. * @return string The API version used for requests. null if we're using the
  48. * latest version.
  49. */
  50. public static function getApiVersion()
  51. {
  52. return self::$apiVersion;
  53. }
  54. /**
  55. * @param string $apiVersion The API version to use for requests.
  56. */
  57. public static function setApiVersion($apiVersion)
  58. {
  59. self::$apiVersion = $apiVersion;
  60. }
  61. /**
  62. * @return boolean
  63. */
  64. public static function getVerifySslCerts()
  65. {
  66. return self::$verifySslCerts;
  67. }
  68. /**
  69. * @param boolean $verify
  70. */
  71. public static function setVerifySslCerts($verify)
  72. {
  73. self::$verifySslCerts = $verify;
  74. }
  75. /**
  76. * @return string
  77. */
  78. public static function getPrivateKeyPath()
  79. {
  80. return self::$privateKeyPath;
  81. }
  82. /**
  83. * @param string $path
  84. */
  85. public static function setPrivateKeyPath($path)
  86. {
  87. self::$privateKeyPath = $path;
  88. }
  89. /**
  90. * @return string
  91. */
  92. public static function getPrivateKey()
  93. {
  94. return self::$privateKey;
  95. }
  96. /**
  97. * @param string $key
  98. */
  99. public static function setPrivateKey($key)
  100. {
  101. self::$privateKey = $key;
  102. }
  103. }