## Class LoggerReflectionUtils

Description

Provides methods for reflective use on php objects

Located in /log4php/LoggerReflectionUtils.php (line 25)

Method Summary
static an createObject ( $class, string $classname)
static void setPropertiesByObject (object $obj, array $properties, string $prefix)
static void setter (object $object, string $name, mixed $value)
LoggerReflectionUtils __construct ( $obj, object &$obj)
void activate ()
void setProperties (array $properties, string $prefix)
void setProperty (string $name, string $value)
Methods
static method createObject (line 128)

Creates an instances from the given class name.

- return: object from the class with the given classname
- access: public

static an createObject ( $class, string $classname)

- string $classname
- $class

static method setPropertiesByObject (line 49)

Set the properties of an object passed as a parameter in one go. The

1. properties

are parsed relative to a

1. prefix

.

- access: public

static void setPropertiesByObject (object $obj, array $properties, string $prefix)

- object $obj: The object to configure.
- array $properties: An array containing keys and values.
- string $prefix: Only keys having the specified prefix will be set.

static method setter (line 140)

- access: public

static void setter (object $object, string $name, mixed $value)

- object $object
- string $name
- mixed $value

Constructor __construct (line 35)

Create a new LoggerReflectionUtils for the specified Object.

This is done in prepartion for invoking setProperty() one or more times.

- access: public

LoggerReflectionUtils __construct ( $obj, object &$obj)

- object &$obj: the object for which to set properties
- $obj

activate (line 116)

- access: public

void activate ()
setProperties (line 68)

Set the properites for the object that match the

1. prefix

passed as parameter.

Example:

$arr['xxxname'] = 'Joe'; $arr['xxxmale'] = true; and prefix xxx causes setName and setMale.

- access: public

void setProperties (array $properties, string $prefix)

- array $properties: An array containing keys and values.
- string $prefix: Only keys having the specified prefix will be set.

setProperty (line 102)

Set a property on this PropertySetter's Object. If successful, this

method will invoke a setter method on the underlying Object. The setter is the one for the specified property name and the value is determined partly from the setter argument type and partly from the value specified in the call to this method.

<p>If the setter expects a String no conversion is necessary. If it expects an int, then an attempt is made to convert 'value' to an int using new Integer(value). If the setter expects a boolean, the conversion is by new Boolean(value).

- access: public

void setProperty (string $name, string $value)

- string $name: name of the property
- string $value: String value of the property

Documentation generated on Wed, 12 Nov 2025 18:40:35 +0900 by phpDocumentor 1.4.4