colorize() публичный статический Метод

This method is used to colorize some text
public static colorize ( string $string, string $color ) : string
$string string the text to be colorized
$color string the color to colorize your
Результат string
Пример #1
0
 /**
  * @param Source $src
  * @param mixed $tasks
  *
  * @return Watch
  *
  * @throws \InvalidArgumentException
  */
 public function watch(Source $src, $tasks)
 {
     if (!is_array($tasks) && !is_callable($tasks)) {
         throw new \InvalidArgumentException('Invalid Argument for Phulp::watch');
     }
     if (is_array($tasks)) {
         Output::out('[' . Output::colorize((new \DateTime())->format('H:i:s'), 'light_gray') . '] ' . Output::colorize('the API of Phulp::watch you are using will be deprecated', 'yellow'));
         Output::out('[' . Output::colorize((new \DateTime())->format('H:i:s'), 'light_gray') . '] ' . Output::colorize('Please check the documentation. ', 'yellow'));
     }
     return new Watch($src, $tasks, $this);
 }