QuickHashIntStringHash::update
Introduction
Variable and Type Related Extensions
PHP Manual

# Reflection

Table of Contents

- Introduction
- Installing/Configuring
  - Requirements
  - Installation
  - Runtime Configuration
  - Resource Types
- Predefined Constants
- Examples
- Extending
- Reflection — The Reflection class
  - Reflection::export — Exports
  - Reflection::getModifierNames — Gets modifier names
- ReflectionClass — The ReflectionClass class
  - ReflectionClass::__construct — Constructs a ReflectionClass
  - ReflectionClass::export — Exports a class
  - ReflectionClass::getConstant — Gets defined constant
  - ReflectionClass::getConstants — Gets constants
  - ReflectionClass::getConstructor — Gets the constructor of the class
  - ReflectionClass::getDefaultProperties — Gets default properties
  - ReflectionClass::getDocComment — Gets doc comments
  - ReflectionClass::getEndLine — Gets end line
  - ReflectionClass::getExtension — Gets a ReflectionExtension object for the extension which defined the class
  - ReflectionClass::getExtensionName — Gets the name of the extension which defined the class
  - ReflectionClass::getFileName — Gets the filename of the file in which the class has been defined
  - ReflectionClass::getInterfaceNames — Gets the interface names
  - ReflectionClass::getInterfaces — Gets the interfaces
  - ReflectionClass::getMethod — Gets a ReflectionMethod for a class method.
  - ReflectionClass::getMethods — Gets an array of methods
  - ReflectionClass::getModifiers — Gets modifiers
  - ReflectionClass::getName — Gets class name
  - ReflectionClass::getNamespaceName — Gets namespace name
  - ReflectionClass::getParentClass — Gets parent class
  - ReflectionClass::getProperties — Gets properties
  - ReflectionClass::getProperty — Gets a ReflectionProperty for a class's property
  - ReflectionClass::getShortName — Gets short name
  - ReflectionClass::getStartLine — Gets starting line number
  - ReflectionClass::getStaticProperties — Gets static properties
  - ReflectionClass::getStaticPropertyValue — Gets static property value
  - ReflectionClass::getTraitAliases — Returns an array of trait aliases
  - ReflectionClass::getTraitNames — Returns an array of names of traits used by this class
  - ReflectionClass::getTraits — Returns an array of traits used by this class
  - ReflectionClass::hasConstant — Checks if constant is defined
  - ReflectionClass::hasMethod — Checks if method is defined
  - ReflectionClass::hasProperty — Checks if property is defined
  - ReflectionClass::implementsInterface — Implements interface
  - ReflectionClass::inNamespace — Checks if in namespace
  - ReflectionClass::isAbstract — Checks if class is abstract
  - ReflectionClass::isCloneable — Returns whether this class is cloneable
  - ReflectionClass::isFinal — Checks if class is final
  - ReflectionClass::isInstance — Checks class for instance
  - ReflectionClass::isInstantiable — Checks if the class is instantiable
  - ReflectionClass::isInterface — Checks if the class is an interface
  - ReflectionClass::isInternal — Checks if class is defined internally by an extension, or the core
  - ReflectionClass::isIterateable — Checks if iterateable
  - ReflectionClass::isSubclassOf — Checks if a subclass
  - ReflectionClass::isTrait — Returns whether this is a trait
  - ReflectionClass::isUserDefined — Checks if user defined
  - ReflectionClass::newInstance — Creates a new class instance from given arguments.
  - ReflectionClass::newInstanceArgs — Creates a new class instance from given arguments.
  - ReflectionClass::newInstanceWithoutConstructor — Creates a new class instance without invoking the constructor.
  - ReflectionClass::setStaticPropertyValue — Sets static property value
  - ReflectionClass::__toString — Returns the string representation of the ReflectionClass object.
- ReflectionZendExtension — The ReflectionZendExtension class
  - ReflectionZendExtension::__clone — Clone handler
  - ReflectionZendExtension::__construct — Constructor
  - ReflectionZendExtension::export — Export
  - ReflectionZendExtension::getAuthor — Gets author
  - ReflectionZendExtension::getCopyright — Gets copyright
  - ReflectionZendExtension::getName — Gets name
  - ReflectionZendExtension::getURL — Gets URL
  - ReflectionZendExtension::getVersion — Gets version
  - ReflectionZendExtension::__toString — To string handler
- ReflectionExtension — The ReflectionExtension class
  - ReflectionExtension::__clone — Clones
  - ReflectionExtension::__construct — Constructs a ReflectionExtension
  - ReflectionExtension::export — Export
  - ReflectionExtension::getClasses — Gets classes
  - ReflectionExtension::getClassNames — Gets class names
  - ReflectionExtension::getConstants — Gets constants
  - ReflectionExtension::getDependencies — Gets dependencies
  - ReflectionExtension::getFunctions — Gets extension functions
  - ReflectionExtension::getINIEntries — Gets extension ini entries
  - ReflectionExtension::getName — Gets extension name
  - ReflectionExtension::getVersion — Gets extension version
  - ReflectionExtension::info — Print extension info
  - ReflectionExtension::isPersistent — Returns whether this extension is persistent
  - ReflectionExtension::isTemporary — Returns whether this extension is temporary
  - ReflectionExtension::__toString — To string
- ReflectionFunction — The ReflectionFunction class
  - ReflectionFunction::__construct — Constructs a ReflectionFunction object
  - ReflectionFunction::export — Exports function
  - ReflectionFunction::getClosure — Returns a dynamically created closure for the function
  - ReflectionFunction::invoke — Invokes function
  - ReflectionFunction::invokeArgs — Invokes function args
  - ReflectionFunction::isDisabled — Checks if function is disabled
  - ReflectionFunction::__toString — To string
- ReflectionFunctionAbstract — The ReflectionFunctionAbstract class
  - ReflectionFunctionAbstract::__clone — Clones function
  - ReflectionFunctionAbstract::getClosureScopeClass — Returns the scope associated to the closure
  - ReflectionFunctionAbstract::getClosureThis — Returns this pointer bound to closure
  - ReflectionFunctionAbstract::getDocComment — Gets doc comment
  - ReflectionFunctionAbstract::getEndLine — Gets end line number
  - ReflectionFunctionAbstract::getExtension — Gets extension info
  - ReflectionFunctionAbstract::getExtensionName — Gets extension name
  - ReflectionFunctionAbstract::getFileName — Gets file name
  - ReflectionFunctionAbstract::getName — Gets function name
  - ReflectionFunctionAbstract::getNamespaceName — Gets namespace name
  - ReflectionFunctionAbstract::getNumberOfParameters — Gets number of parameters
  - ReflectionFunctionAbstract::getNumberOfRequiredParameters — Gets number of required parameters
  - ReflectionFunctionAbstract::getParameters — Gets parameters
  - ReflectionFunctionAbstract::getShortName — Gets function short name
  - ReflectionFunctionAbstract::getStartLine — Gets starting line number
  - ReflectionFunctionAbstract::getStaticVariables — Gets static variables
  - ReflectionFunctionAbstract::inNamespace — Checks if function in namespace
  - ReflectionFunctionAbstract::isClosure — Checks if closure
  - ReflectionFunctionAbstract::isDeprecated — Checks if deprecated
  - ReflectionFunctionAbstract::isGenerator — Returns whether this function is a generator
  - ReflectionFunctionAbstract::isInternal — Checks if is internal
  - ReflectionFunctionAbstract::isUserDefined — Checks if user defined
  - ReflectionFunctionAbstract::returnsReference — Checks if returns reference
  - ReflectionFunctionAbstract::__toString — To string
- ReflectionMethod — The ReflectionMethod class
  - ReflectionMethod::__construct — Constructs a ReflectionMethod
  - ReflectionMethod::export — Export a reflection method.
  - ReflectionMethod::getClosure — Returns a dynamically created closure for the method
  - ReflectionMethod::getDeclaringClass — Gets declaring class for the reflected method.
  - ReflectionMethod::getModifiers — Gets the method modifiers
  - ReflectionMethod::getPrototype — Gets the method prototype (if there is one).
  - ReflectionMethod::invoke — Invoke
  - ReflectionMethod::invokeArgs — Invoke args
  - ReflectionMethod::isAbstract — Checks if method is abstract
  - ReflectionMethod::isConstructor — Checks if method is a constructor
  - ReflectionMethod::isDestructor — Checks if method is a destructor
  - ReflectionMethod::isFinal — Checks if method is final
  - ReflectionMethod::isPrivate — Checks if method is private
  - ReflectionMethod::isProtected — Checks if method is protected
  - ReflectionMethod::isPublic — Checks if method is public
  - ReflectionMethod::isStatic — Checks if method is static
  - ReflectionMethod::setAccessible — Set method accessibility
  - ReflectionMethod::__toString — Returns the string representation of the Reflection method object.
- ReflectionObject — The ReflectionObject class
  - ReflectionObject::__construct — Constructs a ReflectionObject
  - ReflectionObject::export — Export
- ReflectionParameter — The ReflectionParameter class
  - ReflectionParameter::allowsNull — Checks if null is allowed
  - ReflectionParameter::canBePassedByValue — Returns whether this parameter can be passed by value
  - ReflectionParameter::__clone — Clone
  - ReflectionParameter::__construct — Construct
  - ReflectionParameter::export — Exports
  - ReflectionParameter::getClass — Get class
  - ReflectionParameter::getDeclaringClass — Gets declaring class
  - ReflectionParameter::getDeclaringFunction — Gets declaring function
  - ReflectionParameter::getDefaultValue — Gets default parameter value
  - ReflectionParameter::getDefaultValueConstantName — Returns the default value's constant name if default value is constant or null
  - ReflectionParameter::getName — Gets parameter name
  - ReflectionParameter::getPosition — Gets parameter position
  - ReflectionParameter::isArray — Checks if parameter expects an array
  - ReflectionParameter::isCallable — Returns whether parameter MUST be callable
  - ReflectionParameter::isDefaultValueAvailable — Checks if a default value is available
  - ReflectionParameter::isDefaultValueConstant — Returns whether the default value of this parameter is constant
  - ReflectionParameter::isOptional — Checks if optional
  - ReflectionParameter::isPassedByReference — Checks if passed by reference
  - ReflectionParameter::__toString — To string
- ReflectionProperty — The ReflectionProperty class
  - ReflectionProperty::__clone — Clone
  - ReflectionProperty::__construct — Construct a ReflectionProperty object
  - ReflectionProperty::export — Export
  - ReflectionProperty::getDeclaringClass — Gets declaring class
  - ReflectionProperty::getDocComment — Gets doc comment
  - ReflectionProperty::getModifiers — Gets modifiers
  - ReflectionProperty::getName — Gets property name
  - ReflectionProperty::getValue — Gets value
  - ReflectionProperty::isDefault — Checks if default value
  - ReflectionProperty::isPrivate — Checks if property is private
  - ReflectionProperty::isProtected — Checks if property is protected
  - ReflectionProperty::isPublic — Checks if property is public
  - ReflectionProperty::isStatic — Checks if property is static
  - ReflectionProperty::setAccessible — Set property accessibility
  - ReflectionProperty::setValue — Set property value
  - ReflectionProperty::__toString — To string
- Reflector — The Reflector interface
  - Reflector::export — Exports
  - Reflector::__toString — To string
- ReflectionException — The ReflectionException class

# The Reflection class

## Introduction

The reflection class.

## Class synopsis

Reflection
class Reflection {
/* Methods */
public static string export ( Reflector `$reflector` [, bool `$return` = false ] )
public static array getModifierNames ( int `$modifiers` )
}

# The ReflectionClass class

## Introduction

The ReflectionClass class reports information about a class.

## Class synopsis

ReflectionClass
class ReflectionClass implements Reflector {
/* Constants */
const integer ReflectionClass::IS_IMPLICIT_ABSTRACT = 16 ;
const integer ReflectionClass::IS_EXPLICIT_ABSTRACT = 32 ;
const integer ReflectionClass::IS_FINAL = 64 ;
/* Properties */
public $name ;
/* Methods */
public __construct ( mixed `$argument` )
public static string export ( mixed `$argument` [, bool `$return` = false ] )
public mixed getConstant ( string `$name` )
public array getConstants ( void )
public ReflectionMethod getConstructor ( void )
public array getDefaultProperties ( void )
public string getDocComment ( void )
public int getEndLine ( void )
public ReflectionExtension getExtension ( void )
public string getExtensionName ( void )
public string getFileName ( void )
public array getInterfaceNames ( void )
public array getInterfaces ( void )
public ReflectionMethod getMethod ( string `$name` )
public array getMethods ([ int `$filter` ] )
public int getModifiers ( void )
public string getName ( void )
public string getNamespaceName ( void )
public object getParentClass ( void )
public array getProperties ([ int `$filter` ] )
public ReflectionProperty getProperty ( string `$name` )
public string getShortName ( void )
public int getStartLine ( void )
public array getStaticProperties ( void )
public mixed getStaticPropertyValue ( string `$name` [, mixed `&$def_value` ] )
public array getTraitAliases ( void )
public array getTraitNames ( void )
public array getTraits ( void )
public bool hasConstant ( string `$name` )
public bool hasMethod ( string `$name` )
public bool hasProperty ( string `$name` )
public bool implementsInterface ( string `$interface` )
public bool inNamespace ( void )
public bool isAbstract ( void )
public bool isCloneable ( void )
public bool isFinal ( void )
public bool isInstance ( object `$object` )
public bool isInstantiable ( void )
public bool isInterface ( void )
public bool isInternal ( void )
public bool isIterateable ( void )
public bool isSubclassOf ( string `$class` )
public bool isTrait ( void )
public bool isUserDefined ( void )
public object newInstance ( mixed `$args` [, mixed `$...` ] )
public object newInstanceArgs ([ array `$args` ] )
public object newInstanceWithoutConstructor ( void )
public void setStaticPropertyValue ( string `$name` , string `$value` )
public string __toString ( void )
}

## Properties

name

  Name of the class. Read-only, throws ReflectionException in attempt to write.

## Predefined Constants

## ReflectionClass Modifiers

`ReflectionClass::IS_IMPLICIT_ABSTRACT`

  Indicates class that is abstract because it has some abstract methods.

`ReflectionClass::IS_EXPLICIT_ABSTRACT`

  Indicates class that is abstract because of its definition.

`ReflectionClass::IS_FINAL`

  Indicates final class.

# The ReflectionZendExtension class

## Introduction

## Class synopsis

ReflectionZendExtension
class ReflectionZendExtension implements Reflector {
/* Properties */
public $name ;
/* Methods */
final private void __clone ( void )
public __construct ( string `$name` )
public static string export ( string `$name` [, string `$return` ] )
public string getAuthor ( void )
public string getCopyright ( void )
public string getName ( void )
public string getURL ( void )
public string getVersion ( void )
public string __toString ( void )
}

## Properties

name

  Name of the extension. Read-only, throws ReflectionException in attempt to write.

# The ReflectionExtension class

## Introduction

The ReflectionExtension class reports information about an extension.

## Class synopsis

ReflectionExtension
class ReflectionExtension implements Reflector {
/* Properties */
public $name ;
/* Methods */
final private void __clone ( void )
public __construct ( string `$name` )
public static string export ( string `$name` [, string `$return` = false ] )
public array getClasses ( void )
public array getClassNames ( void )
public array getConstants ( void )
public array getDependencies ( void )
public array getFunctions ( void )
public array getINIEntries ( void )
public string getName ( void )
public string getVersion ( void )
public void info ( void )
public void isPersistent ( void )
public void isTemporary ( void )
public string __toString ( void )
}

## Properties

name

  Name of the extension, same as calling the ReflectionExtension::getName method.

# The ReflectionFunction class

## Introduction

The ReflectionFunction class reports information about a function.

## Class synopsis

ReflectionFunction
class ReflectionFunction extends ReflectionFunctionAbstract implements Reflector {
/* Constants */
const integer ReflectionFunction::IS_DEPRECATED = 262144 ;
/* Properties */
public $name ;
/* Methods */
public __construct ( mixed `$name` )
public static string export ( string `$name` [, string `$return` ] )
public Closure getClosure ( void )
public mixed invoke ([ mixed `$parameter` [, mixed `$...` ]] )
public mixed invokeArgs ( array `$args` )
public bool isDisabled ( void )
public string __toString ( void )
/* Inherited methods */
final private void ReflectionFunctionAbstract::__clone ( void )
public ReflectionClass ReflectionFunctionAbstract::getClosureScopeClass ( void )
public object ReflectionFunctionAbstract::getClosureThis ( void )
public string ReflectionFunctionAbstract::getDocComment ( void )
public int ReflectionFunctionAbstract::getEndLine ( void )
public ReflectionExtension ReflectionFunctionAbstract::getExtension ( void )
public string ReflectionFunctionAbstract::getExtensionName ( void )
public string ReflectionFunctionAbstract::getFileName ( void )
public string ReflectionFunctionAbstract::getName ( void )
public string ReflectionFunctionAbstract::getNamespaceName ( void )
public int ReflectionFunctionAbstract::getNumberOfParameters ( void )
public int ReflectionFunctionAbstract::getNumberOfRequiredParameters ( void )
public array ReflectionFunctionAbstract::getParameters ( void )
public string ReflectionFunctionAbstract::getShortName ( void )
public int ReflectionFunctionAbstract::getStartLine ( void )
public array ReflectionFunctionAbstract::getStaticVariables ( void )
public bool ReflectionFunctionAbstract::inNamespace ( void )
public bool ReflectionFunctionAbstract::isClosure ( void )
public bool ReflectionFunctionAbstract::isDeprecated ( void )
public bool ReflectionFunctionAbstract::isGenerator ( void )
public bool ReflectionFunctionAbstract::isInternal ( void )
public bool ReflectionFunctionAbstract::isUserDefined ( void )
public bool ReflectionFunctionAbstract::returnsReference ( void )
abstract public void ReflectionFunctionAbstract::__toString ( void )
}

## Properties

name

  Name of the function. Read-only, throws ReflectionException in attempt to write.

## Predefined Constants

## ReflectionFunction Modifiers

`ReflectionFunction::IS_DEPRECATED`

  Indicates deprecated functions.

# The ReflectionFunctionAbstract class

## Introduction

A parent class to ReflectionFunction, read its description for details.

## Class synopsis

ReflectionFunctionAbstract
class ReflectionFunctionAbstract implements Reflector {
/* Properties */
public $name ;
/* Methods */
final private void __clone ( void )
public ReflectionClass getClosureScopeClass ( void )
public object getClosureThis ( void )
public string getDocComment ( void )
public int getEndLine ( void )
public ReflectionExtension getExtension ( void )
public string getExtensionName ( void )
public string getFileName ( void )
public string getName ( void )
public string getNamespaceName ( void )
public int getNumberOfParameters ( void )
public int getNumberOfRequiredParameters ( void )
public array getParameters ( void )
public string getShortName ( void )
public int getStartLine ( void )
public array getStaticVariables ( void )
public bool inNamespace ( void )
public bool isClosure ( void )
public bool isDeprecated ( void )
public bool isGenerator ( void )
public bool isInternal ( void )
public bool isUserDefined ( void )
public bool returnsReference ( void )
abstract public void __toString ( void )
}

## Properties

name

  Name of the function. Read-only, throws ReflectionException in attempt to write.

# The ReflectionMethod class

## Introduction

The ReflectionMethod class reports information about a method.

## Class synopsis

ReflectionMethod
class ReflectionMethod extends ReflectionFunctionAbstract implements Reflector {
/* Constants */
const integer ReflectionMethod::IS_STATIC = 1 ;
const integer ReflectionMethod::IS_PUBLIC = 256 ;
const integer ReflectionMethod::IS_PROTECTED = 512 ;
const integer ReflectionMethod::IS_PRIVATE = 1024 ;
const integer ReflectionMethod::IS_ABSTRACT = 2 ;
const integer ReflectionMethod::IS_FINAL = 4 ;
/* Properties */
public $name ;
public $class ;
/* Methods */
public __construct ( mixed `$class` , string `$name` )
public static string export ( string `$class` , string `$name` [, bool `$return` = false ] )
public Closure getClosure ( string `$object` )
public ReflectionClass getDeclaringClass ( void )
public int getModifiers ( void )
public ReflectionMethod getPrototype ( void )
public mixed invoke ( object `$object` [, mixed `$parameter` [, mixed `$...` ]] )
public mixed invokeArgs ( object `$object` , array `$args` )
public bool isAbstract ( void )
public bool isConstructor ( void )
public bool isDestructor ( void )
public bool isFinal ( void )
public bool isPrivate ( void )
public bool isProtected ( void )
public bool isPublic ( void )
public bool isStatic ( void )
public void setAccessible ( bool `$accessible` )
public string __toString ( void )
/* Inherited methods */
final private void ReflectionFunctionAbstract::__clone ( void )
public ReflectionClass ReflectionFunctionAbstract::getClosureScopeClass ( void )
public object ReflectionFunctionAbstract::getClosureThis ( void )
public string ReflectionFunctionAbstract::getDocComment ( void )
public int ReflectionFunctionAbstract::getEndLine ( void )
public ReflectionExtension ReflectionFunctionAbstract::getExtension ( void )
public string ReflectionFunctionAbstract::getExtensionName ( void )
public string ReflectionFunctionAbstract::getFileName ( void )
public string ReflectionFunctionAbstract::getName ( void )
public string ReflectionFunctionAbstract::getNamespaceName ( void )
public int ReflectionFunctionAbstract::getNumberOfParameters ( void )
public int ReflectionFunctionAbstract::getNumberOfRequiredParameters ( void )
public array ReflectionFunctionAbstract::getParameters ( void )
public string ReflectionFunctionAbstract::getShortName ( void )
public int ReflectionFunctionAbstract::getStartLine ( void )
public array ReflectionFunctionAbstract::getStaticVariables ( void )
public bool ReflectionFunctionAbstract::inNamespace ( void )
public bool ReflectionFunctionAbstract::isClosure ( void )
public bool ReflectionFunctionAbstract::isDeprecated ( void )
public bool ReflectionFunctionAbstract::isGenerator ( void )
public bool ReflectionFunctionAbstract::isInternal ( void )
public bool ReflectionFunctionAbstract::isUserDefined ( void )
public bool ReflectionFunctionAbstract::returnsReference ( void )
abstract public void ReflectionFunctionAbstract::__toString ( void )
}

## Properties

name

  Method name

class

  Class name

## Predefined Constants

## ReflectionMethod Modifiers

`ReflectionMethod::IS_STATIC`

  Indicates that the method is static.

`ReflectionMethod::IS_PUBLIC`

  Indicates that the method is public.

`ReflectionMethod::IS_PROTECTED`

  Indicates that the method is protected.

`ReflectionMethod::IS_PRIVATE`

  Indicates that the method is private.

`ReflectionMethod::IS_ABSTRACT`

  Indicates that the method is abstract.

`ReflectionMethod::IS_FINAL`

  Indicates that the method is final.

# The ReflectionObject class

## Introduction

The ReflectionObject class reports information about an object.

## Class synopsis

ReflectionObject
class ReflectionObject extends ReflectionClass implements Reflector {
/* Constants */
const integer ReflectionObject::IS_IMPLICIT_ABSTRACT = 16 ;
const integer ReflectionObject::IS_EXPLICIT_ABSTRACT = 32 ;
const integer ReflectionObject::IS_FINAL = 64 ;
/* Properties */
public $name ;
/* Methods */
public __construct ( object `$argument` )
public static string export ( string `$argument` [, bool `$return` ] )
/* Inherited methods */
public ReflectionClass::__construct ( mixed `$argument` )
public static string ReflectionClass::export ( mixed `$argument` [, bool `$return` = false ] )
public mixed ReflectionClass::getConstant ( string `$name` )
public array ReflectionClass::getConstants ( void )
public ReflectionMethod ReflectionClass::getConstructor ( void )
public array ReflectionClass::getDefaultProperties ( void )
public string ReflectionClass::getDocComment ( void )
public int ReflectionClass::getEndLine ( void )
public ReflectionExtension ReflectionClass::getExtension ( void )
public string ReflectionClass::getExtensionName ( void )
public string ReflectionClass::getFileName ( void )
public array ReflectionClass::getInterfaceNames ( void )
public array ReflectionClass::getInterfaces ( void )
public ReflectionMethod ReflectionClass::getMethod ( string `$name` )
public array ReflectionClass::getMethods ([ int `$filter` ] )
public int ReflectionClass::getModifiers ( void )
public string ReflectionClass::getName ( void )
public string ReflectionClass::getNamespaceName ( void )
public object ReflectionClass::getParentClass ( void )
public array ReflectionClass::getProperties ([ int `$filter` ] )
public ReflectionProperty ReflectionClass::getProperty ( string `$name` )
public string ReflectionClass::getShortName ( void )
public int ReflectionClass::getStartLine ( void )
public array ReflectionClass::getStaticProperties ( void )
public mixed ReflectionClass::getStaticPropertyValue ( string `$name` [, mixed `&$def_value` ] )
public array ReflectionClass::getTraitAliases ( void )
public array ReflectionClass::getTraitNames ( void )
public array ReflectionClass::getTraits ( void )
public bool ReflectionClass::hasConstant ( string `$name` )
public bool ReflectionClass::hasMethod ( string `$name` )
public bool ReflectionClass::hasProperty ( string `$name` )
public bool ReflectionClass::implementsInterface ( string `$interface` )
public bool ReflectionClass::inNamespace ( void )
public bool ReflectionClass::isAbstract ( void )
public bool ReflectionClass::isCloneable ( void )
public bool ReflectionClass::isFinal ( void )
public bool ReflectionClass::isInstance ( object `$object` )
public bool ReflectionClass::isInstantiable ( void )
public bool ReflectionClass::isInterface ( void )
public bool ReflectionClass::isInternal ( void )
public bool ReflectionClass::isIterateable ( void )
public bool ReflectionClass::isSubclassOf ( string `$class` )
public bool ReflectionClass::isTrait ( void )
public bool ReflectionClass::isUserDefined ( void )
public object ReflectionClass::newInstance ( mixed `$args` [, mixed `$...` ] )
public object ReflectionClass::newInstanceArgs ([ array `$args` ] )
public object ReflectionClass::newInstanceWithoutConstructor ( void )
public void ReflectionClass::setStaticPropertyValue ( string `$name` , string `$value` )
public string ReflectionClass::__toString ( void )
}

## Properties

name

  Name of the object's class. Read-only, throws ReflectionException in attempt to write.

# The ReflectionParameter class

## Introduction

The ReflectionParameter class retrieves information about function's or method's parameters.

To introspect function parameters, first create an instance of the ReflectionFunction or ReflectionMethod classes and then use their ReflectionFunctionAbstract::getParameters method to retrieve an array of parameters.

## Class synopsis

ReflectionParameter
class ReflectionParameter implements Reflector {
/* Properties */
public $name ;
/* Methods */
public bool allowsNull ( void )
public bool canBePassedByValue ( void )
final private void __clone ( void )
public __construct ( string `$function` , string `$parameter` )
public static string export ( string `$function` , string `$parameter` [, bool `$return` ] )
public ReflectionClass getClass ( void )
public ReflectionClass getDeclaringClass ( void )
public ReflectionFunction getDeclaringFunction ( void )
public mixed getDefaultValue ( void )
public string getDefaultValueConstantName ( void )
public string getName ( void )
public int getPosition ( void )
public bool isArray ( void )
public bool isCallable ( void )
public bool isDefaultValueAvailable ( void )
public bool isDefaultValueConstant ( void )
public bool isOptional ( void )
public bool isPassedByReference ( void )
public string __toString ( void )
}

## Properties

name

  Name of the parameter. Read-only, throws ReflectionException in attempt to write.

# The ReflectionProperty class

## Introduction

The ReflectionProperty class reports information about classes properties.

## Class synopsis

ReflectionProperty
class ReflectionProperty implements Reflector {
/* Constants */
const integer ReflectionProperty::IS_STATIC = 1 ;
const integer ReflectionProperty::IS_PUBLIC = 256 ;
const integer ReflectionProperty::IS_PROTECTED = 512 ;
const integer ReflectionProperty::IS_PRIVATE = 1024 ;
/* Properties */
public $name ;
public $class ;
/* Methods */
final private void __clone ( void )
public __construct ( mixed `$class` , string `$name` )
public static string export ( mixed `$class` , string `$name` [, bool `$return` ] )
public ReflectionClass getDeclaringClass ( void )
public string getDocComment ( void )
public int getModifiers ( void )
public string getName ( void )
public mixed getValue ( object `$object` )
public bool isDefault ( void )
public bool isPrivate ( void )
public bool isProtected ( void )
public bool isPublic ( void )
public bool isStatic ( void )
public void setAccessible ( bool `$accessible` )
public void setValue ( object `$object` , mixed `$value` )
public string __toString ( void )
}

## Properties

name

  Name of the property. Read-only, throws ReflectionException in attempt to write.

class

  Name of the class where the property is defined. Read-only, throws ReflectionException in attempt to write.

## Predefined Constants

## ReflectionProperty Modifiers

`ReflectionProperty::IS_STATIC`

  Indicates static properties.

`ReflectionProperty::IS_PUBLIC`

  Indicates public properties.

`ReflectionProperty::IS_PROTECTED`

  Indicates protected properties.

`ReflectionProperty::IS_PRIVATE`

  Indicates private properties.

# The Reflector interface

## Introduction

Reflector is an interface implemented by all exportable Reflection classes.

## Class synopsis

Reflector
class Reflector {
/* Methods */
abstract public static string export ( void )
abstract public string __toString ( void )
}

# The ReflectionException class

## Introduction

The ReflectionException class.

## Class synopsis

ReflectionException
class ReflectionException extends Exception {
/* Properties */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Inherited methods */
final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public mixed Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final public array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private void Exception::__clone ( void )
}