2016-08-14 10:09:23 +03:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
2017-12-28 17:52:10 +03:00
|
|
|
|
2017-07-05 19:12:03 +03:00
|
|
|
use Shlinkio\Shlink\CLI\Factory\InstallApplicationFactory;
|
2017-07-22 14:41:41 +03:00
|
|
|
use Shlinkio\Shlink\CLI\Install\Plugin\DatabaseConfigCustomizerPlugin;
|
2016-08-19 16:50:08 +03:00
|
|
|
use Symfony\Component\Console\Application;
|
2017-07-05 21:04:44 +03:00
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
2017-07-22 14:41:41 +03:00
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2017-07-05 21:04:44 +03:00
|
|
|
use Zend\ServiceManager\Factory\InvokableFactory;
|
2017-07-05 19:12:03 +03:00
|
|
|
use Zend\ServiceManager\ServiceManager;
|
2016-08-14 11:30:43 +03:00
|
|
|
|
2016-08-19 16:50:08 +03:00
|
|
|
chdir(dirname(__DIR__));
|
|
|
|
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
|
2017-07-22 14:41:41 +03:00
|
|
|
$container = new ServiceManager([
|
|
|
|
'factories' => [
|
|
|
|
Application::class => InstallApplicationFactory::class,
|
|
|
|
Filesystem::class => InvokableFactory::class,
|
|
|
|
],
|
|
|
|
'services' => [
|
|
|
|
'config' => [
|
|
|
|
ConfigAbstractFactory::class => [
|
2017-12-28 17:52:10 +03:00
|
|
|
DatabaseConfigCustomizerPlugin::class => [Filesystem::class]
|
2017-07-22 14:41:41 +03:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]);
|
2017-07-05 19:12:03 +03:00
|
|
|
$container->build(Application::class)->run();
|