t3nma c527ad0803 [COMPOSER] Add new php-ffmpeg package | 4 gadi atpakaļ | |
---|---|---|
.. | ||
.puppet | 4 gadi atpakaļ | |
bin | 4 gadi atpakaļ | |
docs | 4 gadi atpakaļ | |
src | 4 gadi atpakaļ | |
tests | 4 gadi atpakaļ | |
.gitignore | 4 gadi atpakaļ | |
.travis.yml | 4 gadi atpakaļ | |
LICENSE | 4 gadi atpakaļ | |
README.md | 4 gadi atpakaļ | |
Vagrantfile | 4 gadi atpakaļ | |
composer.json | 4 gadi atpakaļ | |
composer.lock | 4 gadi atpakaļ | |
example.php | 4 gadi atpakaļ | |
phpunit.xml.dist | 4 gadi atpakaļ |
Cilex is a simple command line application framework to develop simple tools based on Symfony2 components:
<?php
require_once __DIR__.'/cilex.phar';
$app = new \Cilex\Application('Cilex');
$app->command(new \Cilex\Command\GreetCommand());
$app->run();
Cilex works with PHP 5.3.3 or later and is heavily inspired on the Silex web micro-framework by Fabien Potencier.
git clone
this repository.curl -s https://getcomposer.org/installer | php
php composer.phar install
php ./compile
curl -s https://getcomposer.org/installer | php
php composer.phar require cilex/cilex dev-master
run.php
file<?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->run();
php run.php
Cilex is licensed under the MIT license.
Q: How do I pass configuration into the application?
A: You can do this by adding the following line, where $configPath is the path to the configuration file you want to use:
$app->register(new \Cilex\Provider\ConfigServiceProvider(), array('config.path' => $configPath));
The formats currently supported are: YAML, XML and JSON