Example #1
0
 protected function buildCommands()
 {
     $cmds = array();
     foreach ($this->kernel->getWidgetsPath() as $path) {
         $cmds += $this->getCmdFromDir($path, 'widget.');
     }
     return $cmds;
 }
Example #2
0
<?php

/**
 * @author Wojtek Oledzki <*****@*****.**>
 *
 * Dashbord CLI
 */
$autoloaderPath = __DIR__ . '/../../../autoload.php';
if (!is_file($autoloaderPath)) {
    $autoloaderPath = __DIR__ . '/../vendor/autoload.php';
}
include $autoloaderPath;
$kernel = new \Hoborg\Dashboard\Kernel(__DIR__ . '/../', 'prod');
$option = getopt('c:p:d:');
$kernel->handleCli($option);
Example #3
0
<?php

$rootPath = getenv('DASHBOARD_ROOT') ? getenv('DASHBOARD_ROOT') : __DIR__ . '/..';
require_once "{$rootPath}/vendor/autoload.php";
$kernel = new \Hoborg\Dashboard\Kernel($rootPath);
$kernel->setDefaultParam('conf', 'demo');
$kernel->handle(array_merge($_GET, $_POST));