Zephir\Bootstrap::getCommands PHP Method

getCommands() public static method

Returns the commands registered in the compiler
public static getCommands ( ) : CommandAbstract[]
return Zephir\Commands\CommandAbstract[]
    public static function getCommands()
    {
        return self::$commands;
    }

Usage Example

Esempio n. 1
0
 /**
  * Executes the command
  *
  * Config $config
  * Logger $logger
  */
 public function execute(Config $config, Logger $logger)
 {
     echo self::LOGO, PHP_EOL;
     echo "Zephir version ", Compiler::VERSION, PHP_EOL, PHP_EOL;
     echo "Usage: ", PHP_EOL;
     echo "\tcommand [options]", PHP_EOL;
     echo PHP_EOL;
     echo "Available commands:", PHP_EOL;
     foreach (Bootstrap::getCommands() as $command) {
         echo sprintf("\t%-20s%s\n", $command->getUsage(), $command->getDescription());
     }
     echo PHP_EOL;
     echo "Options:", PHP_EOL;
     echo sprintf("\t%-20s%s\n", "-fno-([a-z0-9\\-]+)", "Setting options to Compiler");
     echo sprintf("\t%-20s%s\n", "-W([a-z0-9\\-]+)", "Setting warning options to Compiler");
     echo PHP_EOL;
 }
All Usage Examples Of Zephir\Bootstrap::getCommands