<?php if (!ini_get("auto_detect_line_endings")) { ini_set("auto_detect_line_endings", '1'); } if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\GreetCommand()); $app->command(new \Gollyg\SolrSyntaxParser\Command\SynonymCommand()); $app->run();
/** * Tests whether the getService method correctly retrieves an element from * the container. */ public function testGetService() { $app = new \Cilex\Application('Test'); $app->command($this->fixture); $this->assertInstanceOf('\\Symfony\\Component\\Console\\Application', $this->fixture->getService('console')); }
<?php require 'app/loader.php'; $engine = new \App\ParseEngine(); $engine->register('ANIMALS', new \App\Strategy\SortedUniqueStrategy()); $engine->register('NUMBERS', new \App\Strategy\UniqueCountStrategy()); $engine->register('CARS', new \App\Strategy\ReverseSortedUniqueHashStrategy()); $app = new \Cilex\Application('Cilex'); $app->command(new \App\Command\ParseCommand($engine)); $app->run();
<?php require __DIR__ . '/../vendor/autoload.php'; $app = new \Cilex\Application('EmailFeed'); $app->command(new \Christiaan\EmailFeed\GenerateFeedCommand()); $app->run();
<?php require_once __DIR__ . '/cilex.phar'; $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\GreetCommand()); $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 if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\AccountOpenCommand()); $app->run();
<?php require_once __DIR__ . '/vendor/autoload.php'; $app = new \Cilex\Application('ConfigGenerator'); $app->command(new \Configen\Command\ConfigenCommand()); $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();
#!/usr/bin/env php <?php if (!($loader = (include __DIR__ . '/../vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\GreetCommand()); $app->command(new \Cilex\Command\DemoInfoCommand()); $app->command('foo', function ($input, $output) { $output->writeln('Example output'); }); $app->run();
<?php if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\GamesCommand()); $app->run();
#!/usr/bin/php <?php /** * Created by PhpStorm. * User: yonman * Date: 27/01/2016 * Time: 6:09 PM */ if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('git-log-version', '1.0.2'); $app->command(new \GitLogVersion\Command\ReportCommand()); $app->command(new \GitLogVersion\Command\LabelCommand()); $app->command(new \GitLogVersion\Command\CommentCommand()); if (file_exists(__DIR__ . '/src')) { $app->command(new \GitLogVersion\Command\BuildCommand(__DIR__)); } $app->run();
<?php if (!($loader = (include __DIR__ . '/vendor/autoload.php'))) { die('You must set up the project dependencies.'); } $app = new \Cilex\Application('Cilex'); $app->command(new \Cilex\Command\TillCommand()); $app->run();
<?php require_once __DIR__ . '/vendor/autoload.php'; $app = new \Cilex\Application('Cilex'); //$app->command(new \Cilex\Command\GreetCommand()); $app->run();
<?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();
#!/usr/bin/env php <?php // Add PHP "Strict Mode" error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT); // Set CWD to the same directory as this file set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . "/../"); chdir(dirname(__FILE__) . "/../"); // No, no, no, go away ini_set('session.use_cookies', '0'); ini_set('magic_quotes_gpc', 'off'); ini_set('magic_quotes_runtime', 'off'); // Init autoloader setup from Composer if (!(include_once __DIR__ . '/vendor/autoload.php')) { die('Have you run composer over this project yet ?'); } // Setup Cilex $app = new \Cilex\Application('A little adventure of code', '1.0'); // Registering Commands // TODO: Now write this class to send us your email to our API (docs: http://www.commonledger.com/job/github/software-engineer) $app->command(new \CommonLedger\Jobs\SoftwareEngineer\Commands\GetToken()); // This class works, and sends us your code that you wrote so we can see how you approached things $app->command(new \CommonLedger\Jobs\SoftwareEngineer\Commands\SendToken()); $app->run();
<?php require_once __DIR__ . "/../common.php"; $app = new Cilex\Application("aruna"); $app['posts_root'] = getenv("ROOT_DIR") . "/posts"; $app['db_file'] = getenv("ROOT_DIR") . "/aruna_db.sq3"; $app['thumbnails_root'] = getenv("ROOT_DIR") . "/thumbnails"; $app['pushover_user_token'] = getenv("PUSHOVER_USER_TOKEN"); $app['pushover_api_token'] = getenv("PUSHOVER_API_TOKEN"); // PROVIDERS // SERVICES $app['monolog'] = $app->share(function () use($app) { $log = new Monolog\Logger("aruna"); $log->pushHandler(new Monolog\Handler\StreamHandler('php://stdout')); return $log; }); $app['http_client'] = $app->share(function () { return new GuzzleHttp\Client(array('timeout' => 20.0)); }); $app['mentions_repository_writer'] = $app->share(function () use($app) { return new Aruna\Webmention\MentionsRepositoryWriter($app['db_cache']); }); $app['image_resizer'] = $app->share(function () use($app) { return new Aruna\Micropub\ImageResizer($app['monolog'], getenv("ROOT_DIR"), $app['thumbnails_root']); }); $app['event_store'] = $app->share(function () use($app) { $adapter = new \League\Flysystem\Adapter\Local(getenv("ROOT_DIR")); $filesystem = new \League\Flysystem\Filesystem($adapter); return new Aruna\EventStore($filesystem); }); $app['db_cache'] = $app->share(function () use($app) {