Returns the level as string.

@param int $level the level number

@return string the level label
321976
public static function getLevelString( $level )
    {
        $name = '';

        switch ( $level )
        {
            case self::LEVEL_DEBUG:
                $name = 'DEBUG';
                break;

            case self::LEVEL_INFO:
                $name = 'INFO';
                break;

            case self::LEVEL_NOTICE:
                $name = 'NOTICE';
                break;

            case self::LEVEL_WARNING:
                $name = 'WARNING';
                break;

            case self::LEVEL_ERROR:
                $name = 'ERROR';
                break;

            case self::LEVEL_CRITICAL:
                $name = 'CRITICAL';
                break;

            case self::LEVEL_ALERT:
                $name = 'ALERT';
                break;

            case self::LEVEL_EMERGENCY:
                $name = 'EMERGENCY';
                break;

            default:
                $name = '';
                break;
        }

        return $name;
    }
1329990
function getNextLevel($level)
    {
        $levels = $this->getLevels();
        $level_incdeces = $this->getLevelIndeces();
        $level_index = $level_incdeces[$level];
        if (!isset($levels[$level_index + 1])) {
            return false;
        }
        $next_level = $levels[$level_index + 1];
        return $next_level;
    }
110197
private function buildLevelsString($levels)
    {
        $this->levelsString = join(DIRECTORY_SEPARATOR, array_fill(0, $levels, '%s')) . DIRECTORY_SEPARATOR;

        return $this;
    }
899522
protected function getAttachmentColor($level)
    {
        switch (true) {
            case $level >= Logger::ERROR:
                return 'danger';
            case $level >= Logger::WARNING:
                return 'warning';
            case $level >= Logger::INFO:
                return 'good';
            default:
                return '#e3e4e6';
        }
    }
1290731
function headerLabel( $page, $level )
    {
        $headerLabel = '';
        foreach ( array_keys( $this->TOC ) as $key )
        {
            $header = $this->TOC[$key];
            if ( $header['pageNumber'] > $page )
                return $headerLabel;

            if ( $header['level'] == $level )
            {
                $headerLabel = $header['label'];
            }
            else if ( $header['level'] < $level )
            {
                $headerLabel = '';
            }
        }

        return $headerLabel;
    }
659684
protected function getAlertColor($level)
    {
        switch (true) {
            case $level >= Logger::ERROR:
                return 'red';
            case $level >= Logger::WARNING:
                return 'yellow';
            case $level >= Logger::INFO:
                return 'green';
            case $level == Logger::DEBUG:
                return 'gray';
            default:
                return 'yellow';
        }
    }
620259
public static function logLevel($level)
  {
    if(is_numeric($level))
    {
      if($level == TeamSpeak3::LOGLEVEL_CRITICAL)
        return "CRITICAL";
      if($level == TeamSpeak3::LOGLEVEL_ERROR)
        return "ERROR";
      if($level == TeamSpeak3::LOGLEVEL_DEBUG)
        return "DEBUG";
      if($level == TeamSpeak3::LOGLEVEL_WARNING)
        return "WARNING";
      if($level == TeamSpeak3::LOGLEVEL_INFO)
        return "INFO";

      return "DEVELOP";
    }
    else
    {
      if(strtoupper($level) == "CRITICAL")
        return TeamSpeak3::LOGLEVEL_CRITICAL;
      if(strtoupper($level) == "ERROR")
        return TeamSpeak3::LOGLEVEL_ERROR;
      if(strtoupper($level) == "DEBUG")
        return TeamSpeak3::LOGLEVEL_DEBUG;
      if(strtoupper($level) == "WARNING")
        return TeamSpeak3::LOGLEVEL_WARNING;
      if(strtoupper($level) == "INFO")
        return TeamSpeak3::LOGLEVEL_INFO;

      return TeamSpeak3::LOGLEVEL_DEVEL;
    }
  }
1196227
public function dirname(string $path, int $levels = 1): string
    {
        [$scheme, $path] = $this->getSchemeAndHierarchy($path);

        if ($this->normalize || ($scheme && null === $this->normalize)) {
            $path = $this->normalizePathPart($path);
        }

        [$scheme, $path] = $this->dirnameInternal($scheme, $path, $levels);

        return $this->toString($scheme, $path);
    }
240554
public static function getErrorPrefix($level)
    {
        switch ($level) {
            case E_PARSE:
                $prefix = 'PHP Parse error';
                break;
            case E_ERROR:
            case E_CORE_ERROR:
            case E_COMPILE_ERROR:
                $prefix = 'PHP Fatal error';
                break;
            case E_USER_ERROR:
            case E_RECOVERABLE_ERROR:
                $prefix = 'PHP error';
                break;
            case E_WARNING:
            case E_CORE_WARNING:
            case E_COMPILE_WARNING:
            case E_USER_WARNING:
                $prefix = 'PHP Warning';
                break;
            case E_NOTICE:
            case E_USER_NOTICE:
                $prefix = 'PHP Notice';
                break;
            case E_STRICT:
                $prefix = 'PHP Debug';
                break;
            default:
                $prefix = 'PHP Notice';
        }
        return $prefix;
    }
1344420
private function loggerLevel($level)
    {
        switch ($level) {
            case 'trace':
            case 'debug':
                return Logger::DEBUG;
                break;

            case 'info':
                return Logger::INFO;
                break;

            case 'notice':
                return Logger::NOTICE;
                break;

            case 'warn':
            case 'warning':
                return Logger::WARNING;
                break;

            case 'error':
                return Logger::ERROR;
                break;

            case 'crit':
            case 'critical':
                return Logger::CRITICAL;
                break;

            case 'alert':
                return Logger::ALERT;
                break;

            case 'emergency':
                return Logger::EMERGENCY;
                break;

            default:
                throw new \Exception('Unknown Log Level', 1);
                break;
        }
    }
696525
public static function toMonologLevel($level): int
    {
        if (is_string($level)) {
            if (defined(__CLASS__.'::'.strtoupper($level))) {
                return constant(__CLASS__.'::'.strtoupper($level));
            }

            throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels)));
        }

        return $level;
    }
1215595
public function getStructLevel($level)
    {
        PWELogger::debug("Building struct level %s", $level);
        $matched = $this->getURL()->getMatchedAsArray();
        if ($level > sizeof($matched)) {
            if (sizeof($this->getURL()->getParamsAsArray())) {
                $module = $this->getCurrentModuleInstance();
                if ($module instanceof MenuGenerator) {
                    PWELogger::debug('Building menu via current module');
                    return $module->getMenuLevel($level);
                }
            }
            return array();
        } else {
            $levelCount = 0;
            $current = &$this->siteStructure['url'];
            while ($levelCount <= $level) {
                $pos = PWEXMLFunctions::findNodeWithAttributeValue($current, 'link', $matched[$levelCount]);
                if ($pos < 0) {
                    //throw new HTTP5xxException("Something gone completely wrong with the structure");
                    break;
                }

                $current[$pos]['selected'] = true;
                //PWELogger::debug("I", $current[$pos]);

                if ($levelCount == $level)
                    break;

                $current = &$current[$pos]['!c']['url'];
                $levelCount++;
            }
            //PWELogger::debug("Final array: ", $current);
            return $current;
        }
    }
1238120
protected function getFileName($level = 100)
    {
        return !empty($this->logname) ? $this->logname : ( $this->isErrorLevel($level) ? $this->error_logfile : $this->logfile );
    }
106268
public function get_taxonomy($level) {
        $taxonomies = $this->get_taxonomies();

        if (empty($taxonomies[$level])) {
            // If for some reason we cannot find the level, we fallback onto competency.
            $constant = self::TAXONOMY_COMPETENCY;
        } else {
            $constant = $taxonomies[$level];
        }

        return $constant;
    }
128259
private function get_log_level( $level, $log_level ) {
		if ( ! isset( $log_level[ $level ] ) && ! isset( $log_level[''] ) ) {
			return 'info';
		}
		'' === $level || ! isset( $log_level[ $level ] ) and $level = $log_level[''];
		if ( empty( $log_level[ $level ] ) ) {
			return 'info';
		}

		return $level;
	}
1152174
public function getCurrentToAttr($level)
    {
        $lookupNames = StringHelper::split(BaseLookup::$lookupPattern, $this->prefetchTo);
        $toAttr = $lookupNames[$level];
        $hasAsAttr = $this->toAttr && $level === count($lookupNames) - 1;
        return [$toAttr, $hasAsAttr];
    }
1042951
public static String getName(Level level) {
    Level normalized = normalize(level);
    return normalized == Level.FINE ? DEBUG : normalized.getName();
  }