# Class LoggerPatternConverter

LoggerPatternConverter is an abstract class that provides the formatting functionality that derived classes need.

Conversion specifiers in a conversion patterns are parsed to individual PatternConverters. Each of which is responsible for converting a logging event in a converter specific manner.

#### Direct known subclasses

LoggerPatternConverterClass, LoggerPatternConverterDate, LoggerPatternConverterMethod, LoggerPatternConverterNDC, LoggerPatternConverterNewLine, LoggerPatternConverterProcess, LoggerPatternConverterRelative, LoggerPatternConverterSessionID, LoggerPatternConverterSuperglobal, LoggerPatternConverterThrowable, LoggerPatternConverterFile, LoggerPatternConverterLevel, LoggerPatternConverterLine, LoggerPatternConverterLiteral, LoggerPatternConverterLocation, LoggerPatternConverterLogger, LoggerPatternConverterMDC, LoggerPatternConverterMessage

#### Indirect known subclasses

LoggerPatternConverterCookie, LoggerPatternConverterEnvironment, LoggerPatternConverterRequest, LoggerPatternConverterServer, LoggerPatternConverterSession
Abstract
Package: log4php\helpers
Version: $Revision: 1326626 $
Since: 0.3
Located at pattern/LoggerPatternConverter.php

Methods summary
`public` | # `__construct( `LoggerFormattingInfo` $formattingInfo = null, array $option = null )` Constructor Constructor #### Parameters $formattingInfo ``LoggerFormattingInfo`` $formattingInfo $option `array` $option
`public` | # `activateOptions( )` Called in constructor. Converters which need to process the options can override this method. Called in constructor. Converters which need to process the options can override this method.
`abstract public` | # `convert( `LoggerLoggingEvent` $event )` Converts the logging event to the desired format. Derived pattern converters must implement this method. Converts the logging event to the desired format. Derived pattern converters must implement this method. #### Parameters $event ``LoggerLoggingEvent`` $event
`public` | # `format( string & $sbuf, `LoggerLoggingEvent` $event )` Converts the event and formats it according to setting in the Formatting information object. Converts the event and formats it according to setting in the Formatting information object. #### Parameters $sbuf `string` &$sbuf string buffer to write to $event ``LoggerLoggingEvent`` $event Event to be formatted.

Properties summary
`public `LoggerPatternConverter`` | $next | `null` | # Next converter in the converter chain. Next converter in the converter chain.
`protected `LoggerFormattingInfo`` | $formattingInfo | `` | # Formatting information, parsed from pattern modifiers. Formatting information, parsed from pattern modifiers.
`protected array` | $option | `` | # Converter-specific formatting options. Converter-specific formatting options.