PHP code example of kerasai / console-command-loader
1. Go to this page and download the library: Download kerasai/console-command-loader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kerasai / console-command-loader example snippets
use Kerasai\ConsoleCommandLoader\TaggedCommandLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
$containerBuilder = new ContainerBuilder();
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__));
$loader->load('services.yml');
$commandLoader = new TaggedCommandLoader($containerBuilder);
$app->setCommandLoader($commandLoader);
$app->run();