protected static function initArguments(CommandEvent $event = null)
    {
        // Check for retrieving arguments from Composer event ...
        if ($event !== null) {
            $arguments = $event->getArguments();
        } else {
            $arguments = $_SERVER['argv'];
        }

        // Check for strict mode
        $strict = in_array('--strict', $arguments);

        $arguments = new \cli\Arguments(compact('strict'), $arguments);
        $arguments->addFlag(array('verbose', 'v'), 'Turn on verbose output');
        $arguments->addFlag(array('version', 'V'), 'Display the version');
        $arguments->addFlag(array('quiet',   'q'), 'Disable all output');
        $arguments->addFlag(array('help',    'h'), 'Show this help screen');

        // Parse the arguments
        $arguments->parse();

        // Store arguments ...
        self::$arguments = $arguments;

        if (isset(self::$arguments['help']) === true) {
            self::showHelp();
        }
    }
protected static function initArguments(CommandEvent $event = null)
    {
        // Check for retrieving arguments from Composer event ...
        if ($event !== null) {
            $arguments = $event->getArguments();
        } else {
            $arguments = $_SERVER['argv'];
        }

        // Check for strict mode
        $strict = in_array('--strict', $arguments);

        $arguments = new \cli\Arguments(compact('strict'), $arguments);
        $arguments->addFlag(array('verbose', 'v'), 'Turn on verbose output');
        $arguments->addFlag(array('version', 'V'), 'Display the version');
        $arguments->addFlag(array('quiet',   'q'), 'Disable all output');
        $arguments->addFlag(array('help',    'h'), 'Show this help screen');

        // Parse the arguments
        $arguments->parse();

        // Store arguments ...
        self::$arguments = $arguments;

        if (isset(self::$arguments['help']) === true) {
            self::showHelp();
        }
    }
protected static function initArguments ( CommandEvent $ event = null ) { // Check for retrieving arguments from Composer event ... if ( $ event !== null ) { $ arguments = $ event -> getArguments ( ) ; } else { $ arguments = $ _SERVER [ 'argv' ] ; } // Check for strict mode $ strict = in_array ( '--strict' , $ arguments ) ; $ arguments = new \ cli \ Arguments ( compact ( 'strict' ) , $ arguments ) ; $ arguments -> addFlag ( array ( 'verbose' , 'v' ) , 'Turn on verbose output' ) ; $ arguments -> addFlag ( array ( 'version' , 'V' ) , 'Display the version' ) ; $ arguments -> addFlag ( array ( 'quiet' , 'q' ) , 'Disable all output' ) ; $ arguments -> addFlag ( array ( 'help' , 'h' ) , 'Show this help screen' ) ; // Parse the arguments $ arguments -> parse ( ) ; // Store arguments ... self :: $ arguments = $ arguments ; if ( isset ( self :: $ arguments [ 'help' ] ) === true ) { self :: showHelp ( ) ; } }
Retrieve arguments from global to prepare them for further use.

@param CommandEvent $event The Composer event fired to retrieve arguments from

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE on success, otherwise FALSE
@access protected
@static
Retrieve arguments from global to prepare them for further use .