ZenMagick 0.9.1


org.zenmagick.ZMObject

Class ZMObject

ZMObject

public class ZMObject

ZenMagick base class.

This is the base class for all ZenMagick classes and contains some very basic stuff that might be usefull for most/all classes.

Author:
mano

Constructor Summary

ZMObject()

Create new instance.

Method Summary
static void

backtrace(string msg)

Simple wrapper around debug_backtrace().

static mixed

create(string name, var args)

Shortcut to create new class instances.

static void

log(string msg, int level)

Simple ZenMagick logging function.

protected static mixed

singleton(string name, string instance)

Get a singleton instance of the calling class.

Constructor Detail

ZMObject

public ZMObject()

Create new instance. /


Method Detail

backtrace

public static void backtrace(string msg)

Simple wrapper around debug_backtrace().

Parameters:
msg - If set, die with the provided message.

create

public static mixed create(string name, var args)

Shortcut to create new class instances.

Parameters:
name - The class name.
args - A variable number of arguments that will be used as arguments for
Returns:
An instance of the class denoted by $name or null.
Deprecated:
Use ZMLoader::make(..) instead.

log

public static void log(string msg, int level)

Simple ZenMagick logging function.

Parameters:
msg - The message to log.
level - Optional level (default: ZM_LOG_INFO).

singleton

protected static mixed singleton(string name, string instance)

Get a singleton instance of the calling class.

Parameters:
name - The class name.
instance - If set, register the given object, unless the name is already taken.
Returns:
A singleton object.

ZenMagick 0.9.1