Class LoggerPropertySetter

Description

General purpose Object property setter. setProperty() in order to invoke setters on the Object specified in the constructor.

General purpose Object property setter. Clients repeatedly invokes setProperty() in order to invoke setters on the Object specified in the constructor. Usage:


1 $ps = new LoggerPropertySetter($anObject);
2 $ps->set("name", "Joe");
3 $ps->set("age", 32);
4 $ps->set("isMale", true);
will cause the invocations

1 $anObject->setName("Joe");
2 $anObject->setAge(32);
3 $anObject->setMale(true)
if such methods exist.

Located in Program_Root/log4php/config/LoggerPropertySetter.php (line 54)


	
			
Variable Summary
mixed $obj
Method Summary
LoggerPropertySetter LoggerPropertySetter (object &$obj)
void activate ()
void setProperties (array $properties, string $prefix)
void setPropertiesByObject (object &$obj, array $properties, string $prefix)
void setProperty (string $name, string $value)
Variables
mixed $obj (line 56)
Methods
Constructor LoggerPropertySetter (line 64)

Create a new LoggerPropertySetter for the specified Object.

Create a new LoggerPropertySetter for the specified Object. This is done in prepartion for invoking setProperty() one or more times.

LoggerPropertySetter LoggerPropertySetter (object &$obj)
  • object &$obj: the object for which to set properties
activate (line 146)
void activate ()
setProperties (line 93)

Set the properites for the object that match the


1 prefix
passed as parameter.

Set the properites for the object that match the


1 prefix
passed as parameter.

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.
setPropertiesByObject (line 79)

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


1 prefix
.

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


1 properties
are parsed relative to a

1 prefix
.

  • 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.
setProperty (line 128)

Set a property on this PropertySetter's Object. method will invoke a setter method on the underlying Object. 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.

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. 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).

void setProperty (string $name, string $value)
  • string $name: name of the property
  • string $value: String value of the property

Documentation generated on Mon, 15 Sep 2003 21:13:18 +0200 by phpDocumentor 1.2.2