当前位置: 首页>>代码示例>>PHP>>正文


PHP Color::head方法代码示例

本文整理汇总了PHP中Phalcon\Script\Color::head方法的典型用法代码示例。如果您正苦于以下问题:PHP Color::head方法的具体用法?PHP Color::head怎么用?PHP Color::head使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phalcon\Script\Color的用法示例。


在下文中一共展示了Color::head方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getHelp

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Creates a module') . PHP_EOL . PHP_EOL;
     print Color::head('Example') . PHP_EOL;
     print Color::colorize('  phalcon module backend', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     $this->printParameters($this->getPossibleParams());
 }
开发者ID:VyacheslavLynnyk,项目名称:scripts,代码行数:13,代码来源:Module.php

示例2: getHelp

 /**
  * Prints the help for current command.
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Creates a controller') . PHP_EOL . PHP_EOL;
     print Color::head('Usage:') . PHP_EOL;
     print Color::colorize('  controller [name] [directory]', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Arguments:') . PHP_EOL;
     print Color::colorize('  ?', Color::FG_GREEN);
     print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     $this->printParameters($this->_possibleParameters);
 }
开发者ID:doit76,项目名称:phalcon-devtools,代码行数:16,代码来源:Controller.php

示例3: getHelp

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Creates a scaffold from a database table') . PHP_EOL . PHP_EOL;
     print Color::head('Usage:') . PHP_EOL;
     print Color::colorize('  scaffold [tableName] [options]', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Arguments:') . PHP_EOL;
     print Color::colorize('  help', Color::FG_GREEN);
     print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     $this->printParameters($this->getPossibleParams());
 }
开发者ID:VyacheslavLynnyk,项目名称:scripts,代码行数:16,代码来源:Scaffold.php

示例4: getHelp

 /**
  * Prints help on the usage of the command
  *
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Enables/disables webtools in a project') . PHP_EOL . PHP_EOL;
     print Color::head('Usage:') . PHP_EOL;
     print Color::colorize('  webtools [action]', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Arguments:') . PHP_EOL;
     print Color::colorize('  ?', Color::FG_GREEN);
     print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     $this->printParameters($this->_possibleParameters);
 }
开发者ID:nicodmf,项目名称:phalcon-devtools,代码行数:15,代码来源:Webtools.php

示例5: getHelp

 /**
  * Prints the help for current command.
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Creates a project') . PHP_EOL . PHP_EOL;
     print Color::head('Usage:') . PHP_EOL;
     print Color::colorize('  project [name] [type] [directory] [enable-webtools]', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Arguments:') . PHP_EOL;
     print Color::colorize('  help', Color::FG_GREEN);
     print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     print Color::head('Example') . PHP_EOL;
     print Color::colorize('  phalcon project store simple', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     $this->printParameters($this->_possibleParameters);
 }
开发者ID:niden,项目名称:phalcon-devtools,代码行数:18,代码来源:Project.php

示例6: getHelp

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Lists the commands available in Phalcon devtools') . PHP_EOL . PHP_EOL;
     $this->run([]);
 }
开发者ID:VyacheslavLynnyk,项目名称:scripts,代码行数:11,代码来源:Enumerate.php

示例7: printParameters

 /**
  * Prints the available options in the script
  *
  * @param array $parameters
  */
 public function printParameters($parameters)
 {
     $length = 0;
     foreach ($parameters as $parameter => $description) {
         if ($length == 0) {
             $length = strlen($parameter);
         }
         if (strlen($parameter) > $length) {
             $length = strlen($parameter);
         }
     }
     print Color::head('Options:') . PHP_EOL;
     foreach ($parameters as $parameter => $description) {
         print Color::colorize(' --' . $parameter . str_repeat(' ', $length - strlen($parameter)), Color::FG_GREEN);
         print Color::colorize("    " . $description) . PHP_EOL;
     }
 }
开发者ID:TommyAzul,项目名称:docker-centos6,代码行数:22,代码来源:Command.php

示例8: getHelp

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 public function getHelp()
 {
     echo Color::head('Help:') . PHP_EOL;
     echo Color::colorize('  Enables/disables webtools in a project') . PHP_EOL . PHP_EOL;
     print Color::head('Usage: Enable webtools') . PHP_EOL;
     print Color::colorize('  webtools enable', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Usage: Disable webtools') . PHP_EOL;
     print Color::colorize('  webtools disable', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     echo Color::head('Arguments:') . PHP_EOL;
     echo Color::colorize('  help', Color::FG_GREEN);
     echo Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     $this->printParameters($this->getPossibleParams());
 }
开发者ID:zhao5908,项目名称:phalcon-devtools,代码行数:18,代码来源:Webtools.php

示例9: getHelp

 /**
  * {@inheritdoc}
  *
  * @return void
  */
 public function getHelp()
 {
     print Color::head('Help:') . PHP_EOL;
     print Color::colorize('  Generates/Run a Migration') . PHP_EOL . PHP_EOL;
     print Color::head('Usage: Generate a Migration') . PHP_EOL;
     print Color::colorize('  migration generate', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Usage: Run a Migration') . PHP_EOL;
     print Color::colorize('  migration run', Color::FG_GREEN) . PHP_EOL . PHP_EOL;
     print Color::head('Arguments:') . PHP_EOL;
     print Color::colorize('  help', Color::FG_GREEN);
     print Color::colorize("\tShows this help text") . PHP_EOL . PHP_EOL;
     $this->printParameters($this->getPossibleParams());
 }
开发者ID:emrullahayin,项目名称:phalcon-devtools,代码行数:18,代码来源:Migration.php


注:本文中的Phalcon\Script\Color::head方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。