print "back-up failed...\n"; } exit; } } } $fp = fopen(__DIR__ . "/resources/regexes.yaml", "w"); fwrite($fp, $data); fclose($fp); if (!self::$silent) { print "success...\n"; } } else { if (!self::$silent) { print "failed to get the file...\n"; } } } } if (defined('STDIN') && isset($argv) && isset($argv[1]) && $argv[1] == '-get') { UA::$silent = isset($argv[2]) && $argv[2] == '-silent' || isset($argv[3]) && $argv[3] == '-silent' ? true : UA::$silent; UA::$nobackup = isset($argv[2]) && $argv[2] == '-nobackup' || isset($argv[3]) && $argv[3] == '-nobackup' ? true : UA::$nobackup; if (!UA::$silent) { print "getting the YAML file...\n"; } UA::get(); } else { if (defined('STDIN')) { print "You must use the -get flag to use UAParser.php from the command line.\n"; } }
} exit; } } } $fp = fopen(__DIR__ . "/resources/regexes.yaml", "w"); fwrite($fp, $data); fclose($fp); if (!$this->silent) { print "success...\n"; } } else { if (!$this->silent) { print "failed to get the file...\n"; } } } } if (defined('STDIN') && isset($argv) && isset($argv[1]) && $argv[1] == '-get') { $ua = new UA(); $ua->silent = isset($argv[2]) && $argv[2] == '-silent' || isset($argv[3]) && $argv[3] == '-silent' ? true : $ua->silent; $ua->nobackup = isset($argv[2]) && $argv[2] == '-nobackup' || isset($argv[3]) && $argv[3] == '-nobackup' ? true : $ua->nobackup; if (!$ua->silent) { print "getting the YAML file...\n"; } $ua->get(); } else { if (defined('STDIN')) { print "You must use the -get flag to use UAParser.php from the command line.\n"; } }