tracking stuff
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
namespace UAParser\Command;
|
||||
|
||||
$packageAutoloader = __DIR__ . '/../vendor/autoload.php';
|
||||
$standaloneAutoloader = __DIR__ . '/../../../autoload.php';
|
||||
if (file_exists($packageAutoloader)) {
|
||||
require_once $packageAutoloader;
|
||||
} else {
|
||||
require_once $standaloneAutoloader;
|
||||
}
|
||||
|
||||
$resourceDirectory = realpath(__DIR__ . '/../resources');
|
||||
$defaultYamlFile = realpath(__DIR__ . '/../resources/regexes.yaml');
|
||||
|
||||
// Ensure symfony packages installed
|
||||
if (!class_exists(\Symfony\Component\Console\Application::class)) {
|
||||
echo 'You must include the symfony packages, see composer.json "suggest" section' . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
use \Symfony\Component\Console\Application;
|
||||
|
||||
$application = new Application('ua-parser');
|
||||
$application->add(new ConvertCommand($resourceDirectory, $defaultYamlFile));
|
||||
$application->add(new UpdateCommand($resourceDirectory));
|
||||
$application->add(new ParserCommand());
|
||||
$application->add(new LogfileCommand());
|
||||
$application->add(new FetchCommand($defaultYamlFile));
|
||||
|
||||
$application->run();
|
||||
Reference in New Issue
Block a user