\ReflectionClass
Synopsis
class ReflectionClass
implements
Reflector
{
- // constants
- const IS_IMPLICIT_ABSTRACT = 16;
- const IS_EXPLICIT_ABSTRACT = 32;
- const IS_FINAL = 64;
- // members
- public $name;
- // methods
- public void __construct()
- public string export()
- public mixed getConstant()
- public array getConstants()
- public ReflectionMethod getConstructor()
- public array getDefaultProperties()
- public string getDocComment()
- public int getEndLine()
- public ReflectionExtension getExtension()
- public string getExtensionName()
- public string getFileName()
- public array getInterfaceNames()
- public array getInterfaces()
- public ReflectionMethod getMethod()
- public array getMethods()
- public int getModifiers()
- public string getName()
- public string getNamespaceName()
- public getParentClass()
- public array getProperties()
- public ReflectionProperty getProperty()
- public string getShortName()
- public int getStartLine()
- public array getStaticProperties()
- public mixed getStaticPropertyValue()
- public array getTraitAliases()
- public array getTraitNames()
- public array getTraits()
- public bool hasConstant()
- public bool hasMethod()
- public bool hasProperty()
- public bool implementsInterface()
- public bool inNamespace()
- public bool isAbstract()
- public bool isCloneable()
- public bool isFinal()
- public bool isInstance()
- public bool isInstantiable()
- public bool isInterface()
- public bool isInternal()
- public bool isIterateable()
- public bool isSubclassOf()
- public bool isTrait()
- public bool isUserDefined()
- public newInstance()
- public newInstanceArgs()
- public newInstanceWithoutConstructor()
- public void setStaticPropertyValue()
- public string __toString()
Hierarchy
Constants
Name | Value |
---|---|
IS_IMPLICIT_ABSTRACT | 16 |
IS_EXPLICIT_ABSTRACT | 32 |
IS_FINAL | 64 |
Members
public
-
$name
Name of the class. Read-only, throws ReflectionException in attempt to write.
Methods
public
- __construct() — Constructs a ReflectionClass
- __toString() — Returns the string representation of the ReflectionClass object.
- export() — Exports a class
- getConstant() — Gets defined constant
- getConstants() — Gets constants
- getConstructor() — Gets the constructor of the class
- getDefaultProperties() — Gets default properties
- getDocComment() — Gets doc comments
- getEndLine() — Gets end line
- getExtension() — Gets a ReflectionExtension object for the extension which defined the class
- getExtensionName() — Gets the name of the extension which defined the class
- getFileName() — Gets the filename of the file in which the class has been defined
- getInterfaceNames() — Gets the interface names
- getInterfaces() — Gets the interfaces
- getMethod() — Gets a ReflectionMethod for a class method.
- getMethods() — Gets an array of methods
- getModifiers() — Gets modifiers
- getName() — Gets class name
- getNamespaceName() — Gets namespace name
- getParentClass() — Gets parent class
- getProperties() — Gets properties
- getProperty() — Gets a ReflectionProperty for a class's property
- getShortName() — Gets short name
- getStartLine() — Gets starting line number
- getStaticProperties() — Gets static properties
- getStaticPropertyValue() — Gets static property value
- getTraitAliases() — Returns an array of trait aliases
- getTraitNames() — Returns an array of names of traits used by this class
- getTraits() — Returns an array of traits used by this class
- hasConstant() — Checks if constant is defined
- hasMethod() — Checks if method is defined
- hasProperty() — Checks if property is defined
- implementsInterface() — Implements interface
- inNamespace() — Checks if in namespace
- isAbstract() — Checks if class is abstract
- isCloneable() — Returns whether this class is cloneable
- isFinal() — Checks if class is final
- isInstance() — Checks class for instance
- isInstantiable() — Checks if the class is instantiable
- isInterface() — Checks if the class is an interface
- isInternal() — Checks if class is defined internally by an extension, or the core
- isIterateable() — Checks if iterateable
- isSubclassOf() — Checks if a subclass
- isTrait() — Returns whether this is a trait
- isUserDefined() — Checks if user defined
- newInstance() — Creates a new class instance from given arguments.
- newInstanceArgs() — Creates a new class instance from given arguments.
- newInstanceWithoutConstructor() — Creates a new class instance without invoking the constructor.
- setStaticPropertyValue() — Sets static property value