/** * Get a available updater instance, or returns NULL is none available. * * @return \Crossjoin\Browscap\Updater\AbstractUpdater */ public static function getInstance() { if (function_exists('curl_init')) { return new Curl(); } elseif ((bool) (int) ini_get('allow_url_fopen') !== false) { return new FileGetContents(); } elseif (($browscapFile = (string) ini_get('browscap')) !== "") { $updater = new Local(); $updater->setOption('LocalFile', $browscapFile); return $updater; } return new None(); }