t3nma c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
..
.puppet c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
bin c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
docs c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
src c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
tests c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
.gitignore c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
.travis.yml c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
LICENSE c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
README.md c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
Vagrantfile c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
composer.json c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
composer.lock c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
example.php c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش
phpunit.xml.dist c527ad0803 [COMPOSER] Add new php-ffmpeg package 4 سال پیش

README.md

Cilex, a simple Command Line Interface framework

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.

Installation

  1. git clone this repository.
  2. Download composer: curl -s https://getcomposer.org/installer | php
  3. Install Cilex' dependencies: php composer.phar install
  4. Create the phar: php ./compile

Usage

  • Download composer: curl -s https://getcomposer.org/installer | php
  • Add to your dependencies: php composer.phar require cilex/cilex dev-master
  • Update the dependencies
  • Create a 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
  • enjoy a lot.

License

Cilex is licensed under the MIT license.

FAQ

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