luyadev/luya

View on GitHub
dev/luyadev

Summary

Maintainability
Test Coverage
#!/usr/bin/env php
<?php
// loaders array
$loaders = [
    'vendor/autoload.php',
    '/../vendor/autoload.php',
    '/../../vendor/autoload.php',
    '/../../../vendor/autoload.php',
];
// find vendor if exists
foreach ($loaders as $file) {
    if (file_exists($file)) {
        require($file);
        $vendor = pathinfo($file, PATHINFO_DIRNAME);
    }
}
define('YII_DEBUG', true);
$boot = new \luya\Boot();
$boot->setBaseYiiFile($vendor . '/yiisoft/yii2/Yii.php');
$boot->setConfigArray([
    'id' => 'devenv', 
    'basePath' => dirname(__DIR__),
    'enableCoreCommands' => false,
    'aliases' => [
        'appFolder' => getcwd(),
    ],
    'defaultRoute' => 'repo',
    'controllerMap' => [
        'repo' => 'luya\dev\RepoController',
        'translation' => 'luya\dev\TranslationController',
    ],
]);
$boot->applicationConsole();