Main compiler bootstrap
예제 #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;
 }
예제 #2
0
 /**
  * Executes the command
  *
  * @param Config $config
  * @param Logger $logger
  */
 public function execute(Config $config, Logger $logger)
 {
     echo self::LOGO, PHP_EOL;
     echo "Zephir version ", Compiler::getCurrentVersion(), 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", "-f([a-z0-9\\-]+)", "Enables compiler optimizations");
     echo sprintf("\t%-20s%s\n", "-fno-([a-z0-9\\-]+)", "Disables compiler optimizations");
     echo sprintf("\t%-20s%s\n", "-w([a-z0-9\\-]+)", "Turns a warning on");
     echo sprintf("\t%-20s%s\n", "-W([a-z0-9\\-]+)", "Turns a warning off");
     echo PHP_EOL;
 }