protected function _initApiUrl() { $int = Frapi_Internal::getCachedDbConfig(); Frapi_Internal::$_hash = isset($int['api_url']) ? hash('sha1', $int['api_url']) : false; }
/** * Get a hash of your server * * If you happen to have multiple installations of frapi * you would get apc cache collisions if we woulnd't have * some sort of hashing and identification of the hostnames. * * Right now this hash is very rudimentary, it's simply and sha1 * hash of the HTTP_HOST that you are serving frapi from. * * @return string self::$_hash The sha1-server hash */ public static function getHash() { if (self::$_hash) { return self::$_hash; } self::$_hash = hash('sha1', $_SERVER['HTTP_HOST']); return self::$_hash; }