2016-04-16 12:57:11 +02:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
2016-07-03 09:14:27 +02:00
|
|
|
use Acelaya\UrlShortener\CliCommands\GenerateShortcodeCommand;
|
2016-07-05 23:16:23 +02:00
|
|
|
use Acelaya\UrlShortener\CliCommands\ResolveUrlCommand;
|
2016-04-17 20:27:24 +02:00
|
|
|
use Interop\Container\ContainerInterface;
|
2016-07-03 09:14:27 +02:00
|
|
|
use Symfony\Component\Console\Application as CliApp;
|
2016-04-16 12:57:11 +02:00
|
|
|
|
2016-04-17 20:27:24 +02:00
|
|
|
/** @var ContainerInterface $container */
|
|
|
|
$container = include __DIR__ . '/../config/container.php';
|
2016-04-16 12:57:11 +02:00
|
|
|
|
2016-07-03 09:14:27 +02:00
|
|
|
$app = new CliApp();
|
|
|
|
$app->addCommands([
|
|
|
|
$container->get(GenerateShortcodeCommand::class),
|
2016-07-05 23:16:23 +02:00
|
|
|
$container->get(ResolveUrlCommand::class),
|
2016-07-03 09:14:27 +02:00
|
|
|
]);
|
|
|
|
$app->run();
|