## Class LoggerRendererMap

Description

Manages defined renderers and determines which renderer to use for a given input.

- version: $Revision: 1394956 $
- since: 0.3

Located in /log4php/renderers/LoggerRendererMap.php (line 30)

Method Summary
LoggerRendererMap __construct ()
void addRenderer (string $renderedClass, string $renderingClass)
void clear ()
string findAndRender (mixed $input)
LoggerRendererObject getByClassName (string $class)
LoggerRenderer getByObject (mixed $object)
void getDefaultRenderer ()
void reset ()
void setDefaultRenderer (string $renderingClass)
Methods
Constructor __construct (line 44)

- access: public

LoggerRendererMap __construct ()
addRenderer (line 61)

Adds a renderer to the map.

If a renderer already exists for the given $renderedClass it will be overwritten without warning.

- access: public

void addRenderer (string $renderedClass, string $renderingClass)

- string $renderedClass: The name of the class which will be rendered by the renderer.
- string $renderingClass: The name of the class which will perform the rendering.

clear (line 176)

Empties the renderer map.

- access: public

void clear ()
findAndRender (line 127)

Finds the appropriate renderer for the given input, and renders it (i.e. converts it to a string).

- return: The rendered contents.
- access: public

string findAndRender (mixed $input)

- mixed $input: Input to render.

getByClassName (line 165)

Returns the appropriate renderer for a given class name.

If no renderer could be found, returns NULL.

- return: Or null if not found.
- access: public

LoggerRendererObject getByClassName (string $class)

- string $class

getByObject (line 150)

Returns the appropriate renderer for a given object.

- return: Or null if none found.
- access: public

LoggerRenderer getByObject (mixed $object)

- mixed $object

getDefaultRenderer (line 116)

Returns the default renderer.

- access: public

void getDefaultRenderer ()
reset (line 181)

Resets the renderer map to it's default configuration.

- access: public

void reset ()
setDefaultRenderer (line 93)

Sets a custom default renderer class.

TODO: there's code duplication here. This method is almost identical to addRenderer(). However, it has custom error messages so let it sit for now.

- access: public

void setDefaultRenderer (string $renderingClass)

- string $renderingClass: The name of the class which will perform the rendering.

Documentation generated on Mon, 02 Feb 2026 13:59:51 +0900 by phpDocumentor 1.4.4