Пример #1
0
 /**
  * @param string $mode \Hypercharge\Config::ENV_LIVE or ::ENV_SANDBOX
  * @param string|array $path e.g. 'scheduler' or an array of string e.g. array('scheduler', '<UNIQUE_ID>', 'transactions')
  * @param array|object $params GET params as key-value hash e.g. array('page'=>1, 'per_page'=>30) examples see unittest
  */
 function __construct($mode, $path, $params = array())
 {
     if (!\Hypercharge\Config::isValidMode($mode)) {
         throw new \Exception('mode must be "sandbox" or "live"');
     }
     $this->mode = $mode;
     $this->path = $path;
     $this->params = $params;
 }