yii 782 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/env php
<?php
/**
 * Yii console bootstrap file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

defined('YII_DEBUG') or define('YII_DEBUG', false);

// fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

require(__DIR__ . '/vendor/autoload.php');
17
require(__DIR__ . '/vendor/yiisoft/yii2/yii/Yii.php');
Qiang Xue committed
18
Yii::importNamespaces(require(__DIR__ . '/vendor/composer/autoload_namespaces.php'));
19 20 21 22 23 24 25

$config = yii\helpers\ArrayHelper::merge(
	require(__DIR__ . '/console/config/main.php'),
	require(__DIR__ . '/console/config/main-local.php')
);

$application = new yii\console\Application($config);
26
return $application->run();