Class PEAR_Delegator_Extensions

Description

This class provides a static delegate that adds methods to a PEAR_Delegator instance

Located in /DelegatorExtensions.php (line 42)


	
			
Method Summary
array getDelegateExact (mixed $owner, class $classname1)
array getDelegateForMethodFirst (mixed $owner, mixed $method, string $method,...)
array getDelegateForMethodRecursive (mixed $owner, mixed $method1, string $method1,...)
array getDelegateForMethodRecursiveExact (mixed $owner, mixed $method1, string $method1,...)
array getDelegateRecursive (mixed $owner, class $classname1)
array getDelegateRecursiveExact (mixed $owner, class $classname1)
bool hasDelegateExact (mixed $owner, [class $specifier = null])
void removeDelegateRecursiveExact (mixed $owner, mixed $specifier, mixed $specifier,...)
bool uncacheMathod (mixed $owner, string $method)
Methods
getDelegateExact (line 101)

Gets the delegate object that is an instance of the specified class.

This method returns classes of the specified type. This does not return subdelegates. That is, it uses only the actual class structures.

array getDelegateExact (mixed $owner, class $classname1)
  • class $classname1: This specifies a delegate classname. Any number of arguments after this is acceptable.
getDelegateForMethodFirst (line 403)

Gets the first native delegate that responds to a certain method.

The method returns the first delegate native to the calling delegator, which can respond to each method in question. Moreover, this method returns delegates that actually implement methods over those that inherit them from delegates.

array getDelegateForMethodFirst (mixed $owner, mixed $method, string $method,...)
  • string $method,...: This specifies the method for whose responder is searched.
getDelegateForMethodRecursive (line 289)

Gets the delegate objects that respond to a certain method.

This method returns delegates native to the calling delegator as well as delegates of delegate owning delegates (it's recursive). This method is provided, because it may be useful, but its use is discouraged, as objects should logically only have access to their native delegates.

array getDelegateForMethodRecursive (mixed $owner, mixed $method1, string $method1,...)
  • string $method1,...: This specifies the method for whose responder is searched.
getDelegateForMethodRecursiveExact (line 353)

Gets the delegate object (native or otherwise) that implements the method in question.

This method returns the delegate in the delegate hierarchy which actually implements the method. This method is provided, because it may be useful, but its use is discouraged, as objects should logically only have access to their native delegates.

  • return:
     An array of the form:
     Array
     (
         [method1] = Array
                        (
                            delegate11
                            delegate12
                            ...
                        )
         [methodi] = Array
                        (
                            delegate1i
                            delegate1i
                            ...
                        )
         ...
     )
     Note: If a single method is passed, a traditional array with numbered
     elements is returned.
  • access: public
  • see: PEAR_Delegator_Extensions::getDelegateForMethodRecursive()
array getDelegateForMethodRecursiveExact (mixed $owner, mixed $method1, string $method1,...)
  • string $method1,...: This specifies the method for whose implementor is searched.
getDelegateRecursive (line 158)

Gets the delegates that is of the specified class.

This method returns instances of the specified classname as well as child instances of the specified classname, including subdelegates, which are anywhere in the delegate hierarchy. This method is provided, because it may be useful, but its use is discouraged, as objects should logically only have access to their native delegates.

array getDelegateRecursive (mixed $owner, class $classname1)
  • class $classname1: This specifies a delegate classname. Any number of arguments after this is acceptable.
getDelegateRecursiveExact (line 227)

Gets the delegate that is of the specified class.

This method returns classes of the specified type. This does not return subdelegates. This method is provided, because it may be useful, but its use is discouraged, as objects should logically only have access to their native delegates.

array getDelegateRecursiveExact (mixed $owner, class $classname1)
  • class $classname1: This specifies a delegate classname. Any number of arguments after this is acceptable.
hasDelegateExact (line 53)

Determines whether or not the calling object adopts a particular delegate.

This returns the availability of a delegate not including subdelegates.

bool hasDelegateExact (mixed $owner, [class $specifier = null])
  • class $specifier: This specifies a delegate classname.
removeDelegateRecursiveExact (line 461)

Removes the specified delegate recursively

Only exact delegates are removed, as it is otherwise superfluous.

void removeDelegateRecursiveExact (mixed $owner, mixed $specifier, mixed $specifier,...)
  • mixed $specifier,...: Specifies the delegate, whose information is is to be removed. If it is a string, then it adheres to the tests of getDelegateExact(). If it is an object, then it searches the for that delegate to remove.
uncacheMathod (line 499)

Removes an entry from the _method_map array.

This method is for removing entries in the _method_map array. it simply tests for the entry for existence and removes it.

This is an internal method.

bool uncacheMathod (mixed $owner, string $method)
  • string $method: This method must be in lowercase.

Documentation generated on Fri, 25 Feb 2005 17:29:13 -0500 by phpDocumentor 1.3.0RC3