Cachearium\CacheLogEnum::getName PHP Method

getName() public static method

Given a name, returns its value or a string saying it is invalid.
public static getName ( string $value ) : string
$value string
return string
    public static function getName($value)
    {
        if (static::valid($value)) {
            $x = static::getNames();
            return $x[$value];
        }
        return 'Invalid: ' . htmlspecialchars($value);
    }

Usage Example

 /**
  * (non-PHPdoc)
  * @see \Cachearium\CacheAbstract::report()
  * @codeCoverageIgnore
  */
 public function report()
 {
     if ($this->should_log == false) {
         return;
     }
     echo '<div class="cachearium cachearium-filesystem"><h2>Cache FS system</h2>';
     echo '<h3>System is: ' . ($this->enabled ? 'enabled' : 'disabled') . '</h3>';
     echo '<ul>';
     foreach ($this->cache_log as $entry) {
         echo '<li>' . CacheLogEnum::getName($entry['status']) . $entry['message'] . '</li>';
     }
     echo '</ul></div>';
 }
All Usage Examples Of Cachearium\CacheLogEnum::getName