mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Created CLI module
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
use Acelaya\UrlShortener\CLI\Command;
|
||||
|
||||
return [
|
||||
|
||||
'cli' => [
|
||||
'commands' => [
|
||||
Command\GenerateShortcodeCommand::class,
|
||||
Command\ResolveUrlCommand::class,
|
||||
Command\ListShortcodesCommand::class,
|
||||
Command\GetVisitsCommand::class,
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
use Acelaya\UrlShortener\CLI;
|
||||
use Shlinkio\Shlink\CLI;
|
||||
use Acelaya\UrlShortener\Factory\CacheFactory;
|
||||
use Acelaya\UrlShortener\Factory\EntityManagerFactory;
|
||||
use Acelaya\UrlShortener\Middleware;
|
||||
|
||||
11
config/cli-config.php
Normal file
11
config/cli-config.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Tools\Console\ConsoleRunner;
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
/** @var ContainerInterface $container */
|
||||
$container = include __DIR__ . '/container.php';
|
||||
/** @var EntityManager $em */
|
||||
$em = $container->get(EntityManager::class);
|
||||
|
||||
return ConsoleRunner::createHelperSet($em);
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
use Shlinkio\Shlink\CLI;
|
||||
use Zend\Expressive\ConfigManager\ConfigManager;
|
||||
use Zend\Expressive\ConfigManager\ZendConfigProvider;
|
||||
|
||||
@@ -13,6 +14,7 @@ use Zend\Expressive\ConfigManager\ZendConfigProvider;
|
||||
|
||||
return call_user_func(function () {
|
||||
$configManager = new ConfigManager([
|
||||
CLI\Config\ConfigProvider::class,
|
||||
new ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php')
|
||||
], 'data/cache/app_config.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user