<?php use Cilex\Provider\ConfigServiceProvider; use Orukusaki\MagentoRestTest\AuthoriseCommand; use Orukusaki\MagentoRestTest\OauthClientProvider; use Orukusaki\MagentoRestTest\RequestCommand; require_once __DIR__ . '/../vendor/autoload.php'; define('CONFIG_PATH', 'config.json'); $app = new Cilex\Application('Rest Tester'); if (!file_exists(CONFIG_PATH)) { file_put_contents(CONFIG_PATH, '{}'); } $app->register(new ConfigServiceProvider(), ['config.path' => CONFIG_PATH]); $app->register(new OauthClientProvider()); $app->command(new AuthoriseCommand()); $app->command(new RequestCommand()); $app->run();
<?php //TODO: config define('DOCS_DIRECTORY', __DIR__ . '/data'); define('BUILD_DIRECTORY', __DIR__ . '/build'); if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('phpdocsToDb'); $app->register(new Cilex\Provider\DoctrineServiceProvider(), array('db.options' => array('driver' => 'pdo_sqlite', 'path' => __DIR__ . '/build/phpdoc.db'))); $app->command(new Chrismou\PhpdocsToDb\Command\CreateCommand($app)); $app->run();
<?php chdir(__DIR__); if (!($loader = (include '../vendor/autoload.php'))) { die('Autoload file not found'); } date_default_timezone_set("Europe/Amsterdam"); $app = new \Cilex\Application('Cilex'); $app->register(new \Cilex\Provider\ConfigServiceProvider(), array('config.path' => "config.json")); $app->register(new Cilex\Provider\DoctrineServiceProvider(), array('db.options' => array('driver' => 'pdo_mysql', 'dbname' => '', 'password' => ''))); $app->command(new \LWS\Palu\Command\SwitchRelay()); $app->command(new \LWS\Palu\Command\ReadTemp()); $app->command(new \LWS\Palu\Command\CleanDatabase()); $app->run();