[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/simpletest/ -> reflection_php5.php (summary)

base include file for SimpleTest

Version: $Id: reflection_php5.php 5999 2007-06-18 13:13:08Z pachanga $
File Size: 371 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SimpleReflection:: (23 methods):
  SimpleReflection()
  classExists()
  classExistsSansAutoload()
  classOrInterfaceExists()
  classOrInterfaceExistsSansAutoload()
  _classOrInterfaceExistsWithAutoload()
  getMethods()
  getInterfaces()
  getInterfaceMethods()
  _isInterfaceMethod()
  getParent()
  isAbstract()
  isInterface()
  hasFinal()
  _onlyParents()
  _isAbstractMethod()
  _isAbstractMethodInParent()
  _isStaticMethod()
  getSignature()
  _getFullSignature()
  _getParameterSignatures()
  _suppressSpurious()
  _isOptional()


Class: SimpleReflection  - X-Ref

Version specific reflection API.

SimpleReflection($interface)   X-Ref
Stashes the class/interface.

param: string $interface    Class or interface

classExists()   X-Ref
Checks that a class has been declared. Versions
before PHP5.0.2 need a check that it's not really
an interface.

return: boolean            True if defined.

classExistsSansAutoload()   X-Ref
Needed to kill the autoload feature in PHP5
for classes created dynamically.

return: boolean        True if defined.

classOrInterfaceExists()   X-Ref
Checks that a class or interface has been
declared.

return: boolean            True if defined.

classOrInterfaceExistsSansAutoload()   X-Ref
Needed to kill the autoload feature in PHP5
for classes created dynamically.

return: boolean        True if defined.

_classOrInterfaceExistsWithAutoload($interface, $autoload)   X-Ref
Needed to select the autoload feature in PHP5
for classes created dynamically.

param: string $interface       Class or interface name.
param: boolean $autoload       True totriggerautoload.
return: boolean                True if interface defined.

getMethods()   X-Ref
Gets the list of methods on a class or
interface.

returns: array              List of method names.

getInterfaces()   X-Ref
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.

getInterfaceMethods()   X-Ref
Gets the list of methods for the implemented
interfaces only.

returns: array      List of enforced method signatures.

_isInterfaceMethod($method)   X-Ref
Checks to see if the method signature has to be tightly
specified.

returns: boolean             True if enforced.
param: string $method        Method name.

getParent()   X-Ref
Finds the parent class name.

returns: string      Parent class name.

isAbstract()   X-Ref
Trivially determines if the class is abstract.

returns: boolean      True if abstract.

isInterface()   X-Ref
Trivially determines if the class is an interface.

returns: boolean      True if interface.

hasFinal()   X-Ref
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.

_onlyParents($interfaces)   X-Ref
Whittles a list of interfaces down to only the
necessary top level parents.

returns: array               List of parent interface names.
param: array $interfaces     Reflection API interfaces

_isAbstractMethod($name)   X-Ref
Checks whether a method is abstract or not.

param: string   $name  Method name.
return: bool            true if method is abstract, else false

_isAbstractMethodInParent($name)   X-Ref
Checks whether a method is abstract in parent or not.

param: string   $name  Method name.
return: bool            true if method is abstract in parent, else false

_isStaticMethod($name)   X-Ref
Checks whether a method is static or not.

param: string    $name    Method name
return: bool            true if method is static, else false

getSignature($name)   X-Ref
Gets the source code matching the declaration
of a method.

param: string $name    Method name.
return: string         Method signature up to last

_getFullSignature($name)   X-Ref
For a signature specified in an interface, full
details must be replicated to be a valid implementation.

param: string $name    Method name.
return: string         Method signature up to last

_getParameterSignatures($method)   X-Ref
Gets the source code for each parameter.

param: ReflectionMethod $method   Method object from
return: array                     List of strings, each

_suppressSpurious($name)   X-Ref
The SPL library has problems with the
Reflection library. In particular, you can
get extra characters in parameter names :(.

param: string $name    Parameter name.
return: string         Cleaner name.

_isOptional($parameter)   X-Ref
Test of a reflection parameter being optional
that works with early versions of PHP5.

param: reflectionParameter $parameter    Is this optional.
return: boolean                          True if optional.



Generated: Sat Nov 22 03:48:54 2008 Cross-referenced by PHPXref 0.7