PHP code example of codito / silex-console-provider
1. Go to this page and download the library: Download codito/silex-console-provider 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/ */
codito / silex-console-provider example snippets
use Codito\Silex\Provider\ConsoleServiceProvider;
$app->register(new ConsoleServiceProvider(), array(
'console.name' => 'Silex CLI Application',
'console.version' => '1.0',
));
/* @var $console \Codito\Silex\Console\Application */
$console = $app['console'];
$console->add(new \Codito\Silex\Console\Command\ClearCacheCommand());
$console->add(new \Codito\Silex\Console\Command\RouterDebugCommand());
$app['cache_dir'] = __DIR__ . '/../var/cache';