public static function main()
    {
        $cli = new static();
        
        // Initialize arguments from factory method.
        $arguments = $cli->setupArguments();
        
        // Add help flag.
        $arguments->addFlag(array('help', 'h'), 'Show help screen.');
        
        // Add verbose flag.
        $arguments->addFlag(array('verbose', 'v'), 'Verbose mode.');
        
        // Parse arguments and provide to implementation.
        $arguments->parse();
        $cli->setArguments($arguments);
        
        if ($arguments['help'] === true) {
            echo $arguments->getHelpScreen() . "\n\n";
        } else {
            // Perform arguments check.
            $cli->checkArguments();
            
            // Run the CLI Module implementation.
            $cli->run();
        }
    }
public static function main()
    {
        $cli = new static();
        
        // Initialize arguments from factory method.
        $arguments = $cli->setupArguments();
        
        // Add help flag.
        $arguments->addFlag(array('help', 'h'), 'Show help screen.');
        
        // Add verbose flag.
        $arguments->addFlag(array('verbose', 'v'), 'Verbose mode.');
        
        // Parse arguments and provide to implementation.
        $arguments->parse();
        $cli->setArguments($arguments);
        
        if ($arguments['help'] === true) {
            echo $arguments->getHelpScreen() . "\n\n";
        } else {
            // Perform arguments check.
            $cli->checkArguments();
            
            // Run the CLI Module implementation.
            $cli->run();
        }
    }
public static function main ( ) { $ cli = new static ( ) ; // Initialize arguments from factory method. $ arguments = $ cli -> setupArguments ( ) ; // Add help flag. $ arguments -> addFlag ( array ( 'help' , 'h' ) , 'Show help screen.' ) ; // Add verbose flag. $ arguments -> addFlag ( array ( 'verbose' , 'v' ) , 'Verbose mode.' ) ; // Parse arguments and provide to implementation. $ arguments -> parse ( ) ; $ cli -> setArguments ( $ arguments ) ; if ( $ arguments [ 'help' ] === true ) { echo $ arguments -> getHelpScreen ( ) . "\n\n" ; } else { // Perform arguments check. $ cli -> checkArguments ( ) ; // Run the CLI Module implementation. $ cli -> run ( ) ; } }
Main CLI entry point.
Main CLI entry point .