ZenMagick 0.9.1


org.zenmagick.ZMModel

Class ZMModel

ZMObject
|
+--ZMModel

public class ZMModel
extends ZMObject

Model base class.

This class provides generic support for properties via get($name), set($name, $value) and, for PHP5, via the corresponding methods __get($name) and __set($name,$value).

Author:
mano
Version:
$Id: ZMModel.php 962 2008-03-31 03:55:54Z DerManoMann $

Constructor Summary

ZMModel()

Create new instance.

Method Summary
mixed

get(string name)

Support to access property values by name.

void

populate(array req)

Populate all available fields from the given request.

void

set(string name, mixed value)

Support to set property values by name.

Methods inherited from org.zenmagick.ZMObject
backtrace, create, log, singleton

Constructor Detail

ZMModel

public ZMModel()

Create new instance. /


Method Detail

get

public mixed get(string name)

Support to access property values by name.

Parameters:
name - The property name.
Returns:
The value or null.

populate

public void populate(array req)

Populate all available fields from the given request.

Parameters:
req - A request; if null, use the current ZMRequest instead.

set

public void set(string name, mixed value)

Support to set property values by name.

Parameters:
name - The property name.
value - The value.

ZenMagick 0.9.1