lithium\analysis\Logger::_configsByPriority PHP Méthode

_configsByPriority() protected static méthode

Gets the names of the adapter configurations that respond to a specific priority. The list of adapter configurations returned will be used to write a message with the given priority.
protected static _configsByPriority ( string $priority, string $message, array $options = [] ) : array
$priority string The priority level of a message to be written.
$message string The message to write to the adapter.
$options array Adapter-specific options.
Résultat array Returns an array of names of configurations which are set up to respond to the message priority specified in `$priority`, or configured to respond to _all_ message priorities.
    protected static function _configsByPriority($priority, $message, array $options = array())
    {
        $configs = array();
        $key = 'priority';
        foreach (array_keys(static::$_configurations) as $name) {
            $config = static::config($name);
            $nameMatch = $config[$key] === true || $config[$key] === $priority;
            $arrayMatch = is_array($config[$key]) && in_array($priority, $config[$key]);
            if ($nameMatch || $arrayMatch) {
                $method = static::adapter($name)->write($priority, $message, $options);
                $method ? $configs[$name] = $method : null;
            }
        }
        return $configs;
    }