public static function encode($object) { // Is the installed version of PHP 5.4 or newer? if (version_compare(phpversion(), '5.4.0', '>=')) { $options = 0; if (\Booya\Config::getInstance()->get('response_json_pretty')) { $options = JSON_PRETTY_PRINT; } return json_encode($object, $options); } else { return json_encode(self::traverse($object)); } }
public function config() { $config = Config::getInstance(); return call_user_func_array(array($config, 'getOrSet'), func_get_args()); }