Moodle  2.2.1
http://www.collinsharper.com
SimpleReflection Class Reference

Public Member Functions

 SimpleReflection ($interface)
 classExists ()
 classExistsSansAutoload ()
 classOrInterfaceExists ()
 classOrInterfaceExistsSansAutoload ()
 getMethods ()
 getInterfaces ()
 getParent ()
 isAbstract ()
 isInterface ()
 hasFinal ()
 getSignature ($method)
 SimpleReflection ($interface)
 classExists ()
 classExistsSansAutoload ()
 classOrInterfaceExists ()
 classOrInterfaceExistsSansAutoload ()
 _classOrInterfaceExistsWithAutoload ($interface, $autoload)
 getMethods ()
 getInterfaces ()
 getInterfaceMethods ()
 _isInterfaceMethod ($method)
 getParent ()
 isAbstract ()
 isInterface ()
 hasFinal ()
 _onlyParents ($interfaces)
 _isAbstractMethod ($name)
 _isConstructor ($name)
 _isAbstractMethodInParents ($name)
 _isStaticMethod ($name)
 getSignature ($name)
 _getFullSignature ($name)
 _getParameterSignatures ($method)
 _suppressSpurious ($name)
 _isOptional ($parameter)

Data Fields

 $_interface

Detailed Description

Definition at line 15 of file reflection_php4.php.


Member Function Documentation

_classOrInterfaceExistsWithAutoload ( interface,
autoload 
)

Needed to select the autoload feature in PHP5 for classes created dynamically.

Parameters:
string$interfaceClass or interface name.
boolean$autoloadTrue totriggerautoload.
Returns:
boolean True if interface defined. private

Definition at line 79 of file reflection_php5.php.

Here is the caller graph for this function:

_getFullSignature ( name)

For a signature specified in an interface, full details must be replicated to be a valid implementation.

Parameters:
string$nameMethod name.
Returns:
string Method signature up to last bracket. private

Definition at line 314 of file reflection_php5.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_getParameterSignatures ( method)

Gets the source code for each parameter.

Parameters:
ReflectionMethod$methodMethod object from reflection API
Returns:
array List of strings, each a snippet of code. private

Definition at line 332 of file reflection_php5.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_isAbstractMethod ( name)

Checks whether a method is abstract or not.

Parameters:
string$nameMethod name.
Returns:
bool true if method is abstract, else false private

Definition at line 221 of file reflection_php5.php.

Here is the caller graph for this function:

Checks whether a method is abstract in all parents or not.

Parameters:
string$nameMethod name.
Returns:
bool true if method is abstract in parent, else false private

Definition at line 245 of file reflection_php5.php.

Here is the caller graph for this function:

_isConstructor ( name)

Checks whether a method is the constructor.

Parameters:
string$nameMethod name.
Returns:
bool true if method is the constructor private

Definition at line 235 of file reflection_php5.php.

_isInterfaceMethod ( method)

Checks to see if the method signature has to be tightly specified.

Parameters:
string$methodMethod name.
Returns:
boolean True if enforced. private

Definition at line 134 of file reflection_php5.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_isOptional ( parameter)

Test of a reflection parameter being optional that works with early versions of PHP5.

Parameters:
reflectionParameter$parameterIs this optional.
Returns:
boolean True if optional. private

Definition at line 373 of file reflection_php5.php.

Here is the caller graph for this function:

_isStaticMethod ( name)

Checks whether a method is static or not.

Parameters:
string$nameMethod name
Returns:
bool true if method is static, else false private

Definition at line 266 of file reflection_php5.php.

Here is the caller graph for this function:

_onlyParents ( interfaces)

Whittles a list of interfaces down to only the necessary top level parents.

Parameters:
array$interfacesReflection API interfaces to reduce.
Returns:
array List of parent interface names. private

Definition at line 196 of file reflection_php5.php.

Here is the caller graph for this function:

_suppressSpurious ( name)

The SPL library has problems with the Reflection library. In particular, you can get extra characters in parameter names :(.

Parameters:
string$nameParameter name.
Returns:
string Cleaner name. private

Definition at line 362 of file reflection_php5.php.

Here is the caller graph for this function:

Checks that a class has been declared.

Returns:
boolean True if defined. public

Definition at line 32 of file reflection_php4.php.

Checks that a class has been declared. Versions before PHP5.0.2 need a check that it's not really an interface.

Returns:
boolean True if defined. public

Definition at line 33 of file reflection_php5.php.

Needed to kill the autoload feature in PHP5 for classes created dynamically.

Returns:
boolean True if defined. public

Definition at line 42 of file reflection_php4.php.

Needed to kill the autoload feature in PHP5 for classes created dynamically.

Returns:
boolean True if defined. public

Definition at line 47 of file reflection_php5.php.

Checks that a class or interface has been declared.

Returns:
boolean True if defined. public

Definition at line 52 of file reflection_php4.php.

Checks that a class or interface has been declared.

Returns:
boolean True if defined. public

Definition at line 57 of file reflection_php5.php.

Here is the call graph for this function:

Needed to kill the autoload feature in PHP5 for classes created dynamically.

Returns:
boolean True if defined. public

Definition at line 62 of file reflection_php4.php.

Needed to kill the autoload feature in PHP5 for classes created dynamically.

Returns:
boolean True if defined. public

Definition at line 67 of file reflection_php5.php.

Here is the call graph for this function:

Gets the list of methods for the implemented interfaces only.

Returns:
array List of enforced method signatures. public

Definition at line 119 of file reflection_php5.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Gets the list of interfaces from a class. If the class name is actually an interface then just that interface is returned.

Returns:
array List of interfaces. public

Definition at line 83 of file reflection_php4.php.

Here is the caller graph for this function:

Gets the list of interfaces from a class. If the class name is actually an interface then just that interface is returned.

Returns:
array List of interfaces. public

Definition at line 105 of file reflection_php5.php.

Here is the call graph for this function:

Gets the list of methods on a class or interface.

Returns:
array List of method names. public

Definition at line 72 of file reflection_php4.php.

Gets the list of methods on a class or interface.

Returns:
array List of method names. public

Definition at line 94 of file reflection_php5.php.

getParent ( )

Finds the parent class name.

Returns:
string Parent class name. public

Definition at line 92 of file reflection_php4.php.

getParent ( )

Finds the parent class name.

Returns:
string Parent class name. public

Definition at line 143 of file reflection_php5.php.

getSignature ( method)

Gets the source code matching the declaration of a method.

Parameters:
string$methodMethod name. public

Definition at line 132 of file reflection_php4.php.

getSignature ( name)

Writes the source code matching the declaration of a method.

Parameters:
string$nameMethod name.
Returns:
string Method signature up to last bracket. public

Definition at line 282 of file reflection_php5.php.

Here is the call graph for this function:

hasFinal ( )

Scans for final methods, but as it's PHP 4 there aren't any.

Returns:
boolean True if the class has a final method. public

Definition at line 122 of file reflection_php4.php.

hasFinal ( )

Scans for final methods, as they screw up inherited mocks by not allowing you to override them.

Returns:
boolean True if the class has a final method. public

Definition at line 178 of file reflection_php5.php.

Determines if the class is abstract, which for PHP 4 will never be the case.

Returns:
boolean True if abstract. public

Definition at line 102 of file reflection_php4.php.

Trivially determines if the class is abstract.

Returns:
boolean True if abstract. public

Definition at line 157 of file reflection_php5.php.

Determines if the the entity is an interface, which for PHP 4 will never be the case.

Returns:
boolean True if interface. public

Definition at line 112 of file reflection_php4.php.

Trivially determines if the class is an interface.

Returns:
boolean True if interface. public

Definition at line 167 of file reflection_php5.php.

SimpleReflection ( interface)

Stashes the class/interface.

Parameters:
string$interfaceClass or interface to inspect.

Definition at line 22 of file reflection_php5.php.

SimpleReflection ( interface)

Stashes the class/interface.

Parameters:
string$interfaceClass or interface to inspect.

Definition at line 23 of file reflection_php4.php.


Field Documentation

$_interface

Definition at line 16 of file reflection_php4.php.


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Enumerations