PHP code example of yiisoft / yii-runner-console
1. Go to this page and download the library: Download yiisoft/yii-runner-console 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/ */
yiisoft / yii-runner-console example snippets
#!/usr/bin/env php
declare(strict_types=1);
use Yiisoft\Yii\Runner\Console\ConsoleApplicationRunner;
['YII_DEBUG'],
environment: $_ENV['YII_ENV']
))->run();
/**
* @var Yiisoft\Config\ConfigInterface $config
* @var Yiisoft\Yii\Runner\Console\ConsoleApplicationRunner $runner
*/
$runner = $runner->withConfig($config);
/**
* @var Psr\Container\ContainerInterface $container
* @var Yiisoft\Yii\Runner\Console\ConsoleApplicationRunner $runner
*/
$runner = $runner->withContainer($container);