public static function _init() { // check we we have the mcrypt library available static::$have_mcrypt = function_exists('mcrypt_encrypt') ? true : false; // load the config $config = \Config::load('encrypt', true); // update the default salt value if one is defined in the config isset($config['salt']) && static::$salt = $config['salt']; }
public static function _init() { // check we we have the mcrypt library available static::$have_mcrypt = function_exists('mcrypt_encrypt'); // load the config $config = \Config::load('crypt', true); // update the defaults with the configed values foreach ($config as $key => $value) { isset(static::${$key}) && (static::${$key} = $value); } }