You are here

private static function Braintree_Configuration::setOrGet in Commerce Braintree 7

4 calls to Braintree_Configuration::setOrGet()
Braintree_Configuration::environment in braintree_php/lib/Braintree/Configuration.php
Braintree_Configuration::merchantId in braintree_php/lib/Braintree/Configuration.php
Braintree_Configuration::privateKey in braintree_php/lib/Braintree/Configuration.php
Braintree_Configuration::publicKey in braintree_php/lib/Braintree/Configuration.php

File

braintree_php/lib/Braintree/Configuration.php, line 131

Class

Braintree_Configuration
acts as a registry for config data.

Code

private static function setOrGet($name, $value = null) {
  if (!empty($value) && is_array($value)) {
    $value = $value[0];
  }
  if (!empty($value)) {
    self::set($name, $value);
  }
  else {
    return self::get($name);
  }
  return true;
}