Skip to content

A packaged version of Cilex Framework with clean project architecture

License

Notifications You must be signed in to change notification settings

pingu1/packaged-cilex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packaged Cilex, a clean version of Cilex with isolated code

Cilex is a simple command line application framework to develop simple tools based on Symfony2 components. However, creating an application with Cilex requires to add your source code at the same level as the package source code, which is not really desirable when dealing with code updates. This version is embedding Cilex as a dependency in order to fully isolate your own code.

Installation

  1. Download composer: curl -s https://getcomposer.org/installer | php
  2. Create a new project based on this one composer.phar create-project pingu1/packaged-cilex test
  3. Init the Git repository in your new project git init

Usage

  • Put your code in the src/command/ folder
  • Add additional directories as needed (src/model/, src/helper/, src/library/ ...)
  • Add your scripts to the cilex entry point (located at the root of the project)
$app->command(new \app\command\YourNamespaceHere());
  • Run the script
./cilex hello
./cilex hello -h
./cilex hello renaud
./cilex hello renaud -y
./cilex hello renaud --yell

Bonus

You can easily update the composer.json file to give another namespace than app to the application by updating the autoloader as follows:

"autoload": {
    "psr-4": {
        "YOUR_APP_NAME_HERE\\": "src/"
    }
}

Help and docs

This repository is just a wrapper of the Cilex project, for additional question regarding how to use Cilex, please check the Cilex project

About

A packaged version of Cilex Framework with clean project architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages