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

Class: IsterMethodProxy

Source Location: /IsterMethodProxy.php

Class Overview

IsterObject
   |
   --IsterMethodProxy

This class represents a method proxy.


Author(s): Ingo Schramm   

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

Methods


Child classes:

IsterUIForm
This class represents a user interface form.
T24TemplateTree
This class represents a parser tree of a template.

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

This class represents a method proxy.

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


[ Top ]


Class Methods


constructor IsterMethodProxy

IsterMethodProxy IsterMethodProxy( )

Constructor

[ Top ]

method getRegister

object IsterMethodProxyRegister getRegister( )

Get the register.

[ Top ]

method hasAlias

boolean hasAlias( string $name)

Check if an alias has been registerd.

Parameters:

string   $name  

[ Top ]

method hasMethod

boolean hasMethod( string $name, [boolean $strict = false])

Check if a method has been registerd.

Unless $strict is true, the method checks if a method or an alias $name has been registered.


Parameters:

string   $name  
boolean   $strict  

[ Top ]

method invoke

mixed invoke( string $methodname, [array $params = null])

Same as invokeNext() but the queue is reset each time the function is called.

In effect this method will always be invoked at the first instance in the queue. If you have only one instance in the queue, this method is what you probably need - not invokeNext().


Parameters:

string   $methodname  
array   $params  

[ Top ]

method invokeNext

mixed invokeNext( string $methodname, [array $params = null])

Invoke a registered method at a subsequent object instance.

The requested method will get the $params array passed as a single value. The return value of invokeMethod() is the return value of the invoked method.

If more than one instance is registered with the method's name the method will be executed on the next instance in the queue. Null is returned if no instance is left or on error. This may be ambigeous if you have methods returning the null value too. You may use lastError() to prevent this.


Parameters:

string   $methodname  
array   $params  

[ Top ]

method lastError

string lastError( )

Read the last error.

This method will return null if no error occured. It will also clean the last error.


[ Top ]

method register

boolean register( object IsterObject &$object, [string $methodname = null], [boolean $strict = false])

Register an object's methods to the proxy.

All methods of $object are registered unless $methodname is given. Then only this single method is registered. If $strict is true, the method will be bound to the class of $object. The value of $object must be a valid instance.


Parameters:

object IsterObject   &$object  
string   $methodname  
boolean   $strict  

[ Top ]

method registerAlias

boolean registerAlias( string $alias, string $method)

Register an alias for a method.

Parameters:

string   $alias  
string   $method  

[ Top ]

method reset

boolean reset( string $methodname)

Reset the queue for a given method.

Parameters:

string   $methodname  

[ Top ]

method setRegister

void setRegister( object IsterMethodProxyRegister $register)

Set the register.

Usually used to clone a register to another proxy. You better do not roll your own register.


Parameters:

object IsterMethodProxyRegister   $register   return boolean

[ Top ]


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