Class SimpleReflection

Description

Version specific reflection API.

Located in /reflection_php5.php (line 14)


	
			
Variable Summary
 mixed $_interface
Method Summary
 SimpleReflection SimpleReflection (string $interface)
 boolean classExists ()
 array getInterfaces ()
 array getMethods ()
 string getParent ()
 string getSignature (string $name)
 boolean hasFinal ()
 boolean isAbstract ()
 boolean isInterface ()
Variables
mixed $_interface (line 15)
Methods
Constructor SimpleReflection (line 22)

Stashes the class/interface.

SimpleReflection SimpleReflection (string $interface)
  • string $interface: Class or interface to inspect.
classExists (line 33)

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

  • return: True if defined.
  • access: public
boolean classExists ()
classExistsSansAutoload (line 47)

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

  • return: True if defined.
  • access: public
boolean classExistsSansAutoload ()
classOrInterfaceExists (line 57)

Checks that a class or interface has been declared.

  • return: True if defined.
  • access: public
boolean classOrInterfaceExists ()
classOrInterfaceExistsSansAutoload (line 67)

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

  • return: True if defined.
  • access: public
boolean classOrInterfaceExistsSansAutoload ()
getInterfaceMethods (line 119)

Gets the list of methods for the implemented interfaces only.

  • return: List of enforced method signatures.
  • access: public
array getInterfaceMethods ()
getInterfaces (line 105)

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

  • return: List of interfaces.
  • access: public
array getInterfaces ()
getMethods (line 94)

Gets the list of methods on a class or interface.

  • return: List of method names.
  • access: public
array getMethods ()
getParent (line 143)

Finds the parent class name.

  • return: Parent class name.
  • access: public
string getParent ()
getSignature (line 282)

Writes the source code matching the declaration of a method.

  • return: Method signature up to last bracket.
  • access: public
string getSignature (string $name)
  • string $name: Method name.
hasFinal (line 178)

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

  • return: True if the class has a final method.
  • access: public
boolean hasFinal ()
isAbstract (line 157)

Trivially determines if the class is abstract.

  • return: True if abstract.
  • access: public
boolean isAbstract ()
isInterface (line 167)

Trivially determines if the class is an interface.

  • return: True if interface.
  • access: public
boolean isInterface ()

Documentation generated on Sun, 04 May 2008 09:21:59 -0500 by phpDocumentor 1.3.0