Пример #1
0
 /**
  * @param Console $console
  */
 public function registerConsole($console)
 {
     $config = $this->container['migrations'];
     $phinx_config = new PhinxConfig($config, '');
     $console->add((new PhinxCommand\Create())->setConfig($phinx_config)->setName('migrations:create'));
     $console->add((new PhinxCommand\Migrate())->setConfig($phinx_config)->setName('migrations:migrate'));
     $console->add((new PhinxCommand\Rollback())->setConfig($phinx_config)->setName('migrations:rollback'));
     $console->add((new PhinxCommand\Status())->setConfig($phinx_config)->setName('migrations:status'));
 }
Пример #2
0
 /**
  * @param Console $console
  */
 public function registerConsole($console)
 {
     $console->add(new AssetsCommand());
 }
Пример #3
0
<?php

error_reporting(-1);
ini_set('display_errors', 1);
define('ROOT_PATH', __DIR__ . '/');
define('APPLICATION_PATH', ROOT_PATH . 'Application/');
define('CONFIG_PATH', APPLICATION_PATH . 'configs/');
define('PUBLIC_PATH', ROOT_PATH . 'www/');
define('FILE_PATH', PUBLIC_PATH . 'files/');
define('FILE_PATH_URL', '/files/');
require_once ROOT_PATH . 'vendor/autoload.php';
use Nameless\Core\Application;
use Nameless\Core\Console;
$console = new Console(new Application(), 'Nameless', '0.2.1');
$console->run();