[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/externals/balanced-php/src/Balanced/ -> Settings.php (source)

   1  <?php
   2  
   3  namespace Balanced;
   4  
   5  /**
   6   * Configurable settings.
   7   *
   8   *  You can either set these settings individually:
   9   *
  10   *  <code>
  11   *  \Balanced\Settngs::api_key = 'my-api-key-secret';
  12   *  </code>
  13   *
  14   *  or all at once:
  15   *
  16   *  <code>
  17   *  \Balanced\Settngs::configure(
  18   *      'https://api.balancedpayments.com',
  19   *      'my-api-key-secret'
  20   *      );
  21   *  </code>
  22   */
  23  class Settings
  24  {
  25      const VERSION = '0.7.1';
  26  
  27      public static $url_root = 'https://api.balancedpayments.com',
  28                    $api_key = null,
  29                    $agent = 'balanced-php',
  30                    $version = Settings::VERSION;
  31  
  32      /**
  33       * Configure all settings.
  34       *
  35       * @param string url_root The root (schema://hostname[:port]) to use when constructing api URLs.
  36       * @param string api_key The api key secret to use for authenticating when talking to the api. If null then api usage is limited to uauthenticated endpoints.
  37       */
  38      public static function configure($url_root, $api_key)
  39      {
  40          self::$url_root= $url_root;
  41          self::$api_key = $api_key;
  42      }
  43  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1