n2n Page Rocket 1 API

n2n\log4php\renderer

­Renderer­Map

RendererMap
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Methods summary

Modifier and Type Method
public __construct ( )
public addRenderer ( string renderedClass , string renderingClass )
public setDefaultRenderer ( string renderingClass )
public getDefaultRenderer ( )
public string findAndRender ( mixed input )
public LoggerRenderer getByObject ( mixed object )
public LoggerRendererObject getByClassName ( string class )
public clear ( )
public reset ( )

Methods in detail

  • __construct

    public __construct ( )
  • addRenderer

    public addRenderer ( string renderedClass , string renderingClass )
    Adds a renderer to the map. If a renderer already exists for the given $renderedClass</var> it will be overwritten without warning.
    param
    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.
  • setDefaultRenderer

    public setDefaultRenderer ( string renderingClass )
    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.
    param
    string renderingClass The name of the class which will perform the rendering.
  • getDefaultRenderer

    public getDefaultRenderer ( )
    Returns the default renderer.
    var
    LoggerRenderer
  • findAndRender

    string public findAndRender ( mixed input )
    Finds the appropriate renderer for the given input</var>, and renders it (i.e. converts it to a string).
    param
    mixed input Input to render.
    return
    string
  • getByObject

    LoggerRenderer public getByObject ( mixed object )
    Returns the appropriate renderer for a given object.
    param
    mixed object
    return
  • getByClassName

    LoggerRendererObject public getByClassName ( string class )
    Returns the appropriate renderer for a given class name. If no renderer could be found, returns NULL.
    param
    string class
    return
    n2n\log4php\renderer\LoggerRendererObject
  • clear

    public clear ( )
  • reset

    public reset ( )