Peridot\Configuration::areColorsEnabled PHP 메소드

areColorsEnabled() 공개 메소드

Check if output colors are disabled
public areColorsEnabled ( ) : boolean
리턴 boolean
    public function areColorsEnabled()
    {
        return $this->colorsEnableExplicit || $this->colorsEnabled;
    }

Usage Example

 /**
  * Given a color name, colorize the provided text in that
  * color
  *
  * @param $key
  * @param $text
  * @return string
  */
 public function color($key, $text)
 {
     if (!$this->configuration->areColorsEnabled() || !$this->hasColorSupport()) {
         return $text;
     }
     $color = $this->colors[$key];
     return sprintf("%s%s%s", $color['left'], $text, $color['right']);
 }
All Usage Examples Of Peridot\Configuration::areColorsEnabled