private static function init() { if (self::$db) { return; } $config = Kohana::$config->load('database')->get('mongo'); self::$client = new MongoClient($config['host']); self::$db = self::$client->selectDB($config['database']); }