Essence\Cli::process PHP Method

process() public method

public process ( array $arguments )
$arguments array
    public function process(array $arguments)
    {
        try {
            $this->_parse($arguments);
        } catch (Exception $Exception) {
            $this->_print($Exception->getMessage());
        }
    }

Usage Example

 *	@author FĂ©lix Girault <*****@*****.**>
 *	@license FreeBSD License (http://opensource.org/licenses/BSD-2-Clause)
 *	@todo Create a separate repo for CLI with clean code.
 */
namespace Essence;

use Exception;
/**
 *	Autoloading.
 */
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
/**
 *	Processing.
 */
$Cli = new Cli();
$Cli->process($argv);
/**
 *
 */
class Cli
{
    /**
     *
     */
    protected $_Essence = null;
    /**
     *
     */
    public function __construct()
    {
        $this->_Essence = new Essence();