private static function Braintree_Configuration::get in Commerce Braintree 7
1 call to Braintree_Configuration::get()
- Braintree_Configuration::setOrGet in braintree_php/
lib/ Braintree/ Configuration.php
File
- braintree_php/
lib/ Braintree/ Configuration.php, line 112
Class
- Braintree_Configuration
- acts as a registry for config data.
Code
private static function get($key) {
// throw an exception if the value hasn't been set
if (isset(self::$_cache[$key]) && empty(self::$_cache[$key])) {
throw new Braintree_Exception_Configuration($key . ' needs to be set');
}
if (array_key_exists($key, self::$_cache)) {
return self::$_cache[$key];
}
// return null by default to prevent __set from overloading
return null;
}