mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 23:23:42 -06:00
18 lines
606 B
PHP
Executable File
18 lines
606 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
use Interop\Container\ContainerInterface;
|
|
use Zend\Diactoros\ServerRequestFactory;
|
|
use Zend\Diactoros\Uri;
|
|
use Zend\Expressive\Application;
|
|
|
|
/** @var ContainerInterface $container */
|
|
$container = include __DIR__ . '/../config/container.php';
|
|
/** @var Application $app */
|
|
$app = $container->get(Application::class);
|
|
|
|
$command = count($_SERVER['argv']) > 1 ? $_SERVER['argv'][1] : '';
|
|
$request = ServerRequestFactory::fromGlobals()
|
|
->withMethod('CLI')
|
|
->withUri(new Uri(sprintf('/%s', $command)));
|
|
$app->run($request);
|