public static function applyformatToText() {
    $args = func_get_args();
    $count = func_num_args();

    $text = $args[$count - 1];
    if ($count == 1) { return $text; }

    $mode_texts = array_slice($args, 0, $count - 1);

    return self::buildEscapeCodes($mode_texts).$text.self::buildEscapeCodes('plain');
  }
public static function applyformatToText() {
    $args = func_get_args();
    $count = func_num_args();

    $text = $args[$count - 1];
    if ($count == 1) { return $text; }

    $mode_texts = array_slice($args, 0, $count - 1);

    return self::buildEscapeCodes($mode_texts).$text.self::buildEscapeCodes('plain');
  }
public static function applyformatToText ( ) { $ args = func_get_args ( ) ; $ count = func_num_args ( ) ; $ text = $ args [ $ count - 1 ] ; if ( $ count == 1 ) { return $ text ; } $ mode_texts = array_slice ( $ args , 0 , $ count - 1 ) ; return self :: buildEscapeCodes ( $ mode_texts ) . $ text . self :: buildEscapeCodes ( 'plain' ) ; }
Applies one or more console formatting codes to text

@param string $mode A mode like bold or black.  This can be repeated numerous times.
@param string $text the text to be formatted

@return string a formatted version of $text
Applies one or more console formatting codes to text