## Class LoggerPatternConverterSuperglobal

Description

Returns a value from a superglobal array corresponding to the given key.

Option: the key to look up within the superglobal array

Also, it is possible that a superglobal variable is not populated by PHP because of the settings in the variables-order ini directive. In this case the converter will return an empty value.

- version: $Revision: 1326626 $
- see: ini.variables-order
- see: http://php.net/manual/en/language.variables.superglobals.php
- abstract:
- since: 2.3

Located in /log4php/pattern/LoggerPatternConverterSuperglobal.php (line 39)

    LoggerPatternConverter
       |
       --LoggerPatternConverterSuperglobal

Direct descendents

Class | Description
--- | ---
LoggerPatternConverterEnvironment | Returns a value from the $_ENV superglobal array corresponding to the given key.
LoggerPatternConverterServer | Returns a value from the $_SERVER superglobal array corresponding to the given key.
LoggerPatternConverterCookie | Returns a value from the $_COOKIE superglobal array corresponding to the given key. If no key is given, return all values.
LoggerPatternConverterSession | Returns a value from the $_SESSION superglobal array corresponding to the given key.
LoggerPatternConverterRequest | Returns a value from the $_REQUEST superglobal array corresponding to the given key.

Variable Summary
mixed $name
mixed $value
Method Summary
void activateOptions ()
void convert (LoggerLoggingEvent $event)
Variables
mixed $name (line 45)

Name of the superglobal variable, to be defined by subclasses.

For example: "_SERVER" or "_ENV".

- access: protected

Redefined in descendants as:

- LoggerPatternConverterEnvironment::$name
- LoggerPatternConverterServer::$name
- LoggerPatternConverterCookie::$name
- LoggerPatternConverterSession::$name
- LoggerPatternConverterRequest::$name

mixed $value = '' (line 47)

- access: protected

#### Inherited Variables

Inherited from LoggerPatternConverter

> LoggerPatternConverter::$formattingInfo
> LoggerPatternConverter::$next
> LoggerPatternConverter::$option

Methods
activateOptions (line 49)

- access: public

void activateOptions ()

Redefinition of:

LoggerPatternConverter::activateOptions()
  Called in constructor. Converters which need to process the options can override this method.

convert (line 99)

- access: public

void convert (LoggerLoggingEvent $event)

- LoggerLoggingEvent $event

Redefinition of:

LoggerPatternConverter::convert()
  Converts the logging event to the desired format. Derived pattern converters must implement this method.

#### Inherited Methods

Inherited From LoggerPatternConverter

> LoggerPatternConverter::__construct()
> LoggerPatternConverter::activateOptions()
> LoggerPatternConverter::convert()
> LoggerPatternConverter::format()

Documentation generated on Fri, 10 Apr 2026 12:21:05 +0900 by phpDocumentor 1.4.4