# Class LoggerRendererMap

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

Package: log4php\renderers
Version: $Revision: 1394956 $
Since: 0.3
Located at renderers/LoggerRendererMap.php

Methods summary
`public` | # `__construct( )`
`public` | # `addRenderer( string $renderedClass, string $renderingClass )` Adds a renderer to the map. Adds a renderer to the map. If a renderer already exists for the given $renderedClass it will be overwritten without warning.

#### Parameters

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

`public` | # `setDefaultRenderer( string $renderingClass )` Sets a custom default renderer class. 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.

#### Parameters

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

`public` | # `getDefaultRenderer( )` Returns the default renderer. Returns the default renderer.

#### Var

LoggerRenderer
`public string` | # `findAndRender( mixed $input )` Finds the appropriate renderer for the given input, and renders it (i.e. converts it to a string). Finds the appropriate renderer for the given input, and renders it (i.e. converts it to a string).

#### Parameters

$input
  `mixed`
  $input Input to render.

#### Returns

`string`
The rendered contents.
`public `LoggerRenderer`` | # `getByObject( mixed $object )` Returns the appropriate renderer for a given object. Returns the appropriate renderer for a given object.

#### Parameters

$object
  `mixed`
  $object

#### Returns

``LoggerRenderer``
Or null if none found.
`public LoggerRendererObject` | # `getByClassName( string $class )` Returns the appropriate renderer for a given class name. Returns the appropriate renderer for a given class name. If no renderer could be found, returns NULL.

#### Parameters

$class
  `string`
  $class

#### Returns

`LoggerRendererObject`
Or null if not found.
`public` | # `clear( )` Empties the renderer map. Empties the renderer map.
`public` | # `reset( )` Resets the renderer map to it's default configuration. Resets the renderer map to it's default configuration.