本文整理汇总了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());
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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([]);
}
示例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;
}
}
示例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());
}
示例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());
}