Refactored help system. [skip ci]

This commit is contained in:
Qiang Xue
2014-09-04 19:47:52 -04:00
parent 7efb47bf39
commit fadfdf690a
4 changed files with 40 additions and 126 deletions

View File

@ -491,15 +491,15 @@ class BaseConsole
* </pre>
* First param is the string to convert, second is an optional flag if
* colors should be used. It defaults to true, if set to false, the
* colorcodes will just be removed (And %% will be transformed into %)
* color codes will just be removed (And %% will be transformed into %)
*
* @param string $string String to convert
* @param boolean $colored Should the string be colored?
* @return string
*/
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
public static function renderColoredString($string, $colored = true)
{
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
static $conversions = [
'%y' => [self::FG_YELLOW],
'%g' => [self::FG_GREEN],
@ -562,9 +562,9 @@ class BaseConsole
* @access public
* @return string
*/
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
public static function escape($string)
{
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
return str_replace('%', '%%', $string);
}