util 
[ doc home ] [ class tree: util ] [ index: util ] [ all elements ]

Class: IsterObjectChecker

Source Location: /IsterObjectChecker.php

Class Overview

IsterObject
   |
   --IsterObjectChecker

Compare two objects.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

Compare two objects.

An IsterObjectChecker is initialized with a given object, which becomes the owner of this checker. Then the owner can compare other objects with given class names.

The benefit of this class is mainly consistent error reporting. Note that warnings will be thrown at the owner object, not at the IsterObjectChecker object.


copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Methods


constructor IsterObjectChecker

IsterObjectChecker IsterObjectChecker( object IsterObject $owner)

Constructor

Parameters:

object IsterObject   $owner   Owner object.

[ Top ]

method compareClass

boolean compareClass( object Object $object, string $check)

Compare the owner class with the class of another object.

Return false if class of $object is not a subclass of or the same class as the class given with $check, true otherwise.


Parameters:

object Object   $object   The object to check.
string   $check   Name of class to check for.

[ Top ]

method compareClassStrict

boolean compareClassStrict( object Object $object, string $check)

Compare the owner class with the class of another object, strict.

Return false if the class name of $object is not equal to that given with $check, true otherwise, null on error.


Parameters:

object Object   $object   The object to check.
string   $check   Name of class to check for.

[ Top ]

method isSubclassOf

boolean. isSubclassOf( object Object $object, string $check)

Check whether $object is an instance of a subclass of the class given with $check.

Parameters:

object Object   $object   The object to check.
string   $check   Name of class to check for.

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:21:02 +0100 by phpDocumentor 1.3.0RC4