Methods summary
public
|
|
public
string
|
#
getName( )
Returns the name (FQN).
Returns
string
Implementation of
|
public
string
|
#
getPrettyName( )
Returns an element pretty (docblock compatible) name.
Returns an element pretty (docblock compatible) name.
Returns
string
Implementation of
|
public
string
|
#
getShortName( )
Returns the unqualified name (UQN).
Returns the unqualified name (UQN).
Returns
string
Implementation of
|
public
string
|
#
getNamespaceName( )
Returns the namespace name.
Returns the namespace name.
Returns
string
Implementation of
|
public
boolean
|
#
inNamespace( )
Returns if the class is defined within a namespace.
Returns if the class is defined within a namespace.
Returns
boolean
Implementation of
|
public
array
|
#
getNamespaceAliases( )
Returns imported namespaces and aliases from the declaring namespace.
Returns imported namespaces and aliases from the declaring namespace.
Returns
array
Implementation of
|
public
null
|
#
getExtension( )
Returns the PHP extension reflection.
Returns the PHP extension reflection.
Returns
null
Implementation of
|
public
boolean
|
#
getExtensionName( )
Returns the PHP extension name.
Returns the PHP extension name.
Returns
boolean
Implementation of
|
public
null
|
#
getFileName( )
Returns the file name the reflection object is defined in.
Returns the file name the reflection object is defined in.
Returns
null
Implementation of
|
public
TokenReflection\ReflectionFile
|
#
getFileReflection( )
Returns a file reflection.
Returns a file reflection.
Returns
Throws
|
public
null
|
#
getStartLine( )
Returns the definition start line number in the file.
Returns the definition start line number in the file.
Returns
null
Implementation of
|
public
null
|
#
getEndLine( )
Returns the definition end line number in the file.
Returns the definition end line number in the file.
Returns
null
Implementation of
|
public
boolean
|
#
hasAnnotation( string $name )
Checks if there is a particular annotation.
Checks if there is a particular annotation.
Parameters
- $name
string $name Annotation name
Returns
boolean
|
public
null
|
#
getAnnotation( string $name )
Returns a particular annotation value.
Returns a particular annotation value.
Parameters
- $name
string $name Annotation name
Returns
null
|
public
array
|
|
public
integer
|
#
getModifiers( )
Returns modifiers.
Returns
integer
Implementation of
|
public
boolean
|
#
isAbstract( )
Returns if the class is abstract.
Returns if the class is abstract.
Returns
boolean
Implementation of
|
public
boolean
|
#
isFinal( )
Returns if the class is final.
Returns if the class is final.
Returns
boolean
Implementation of
|
public
boolean
|
#
isInterface( )
Returns if the class is an interface.
Returns if the class is an interface.
Returns
boolean
Implementation of
|
public
boolean
|
#
isException( )
Returns if the class is an exception or its descendant.
Returns if the class is an exception or its descendant.
Returns
boolean
Implementation of
|
public
boolean
|
#
isInstantiable( )
Returns if it is possible to create an instance of this class.
Returns if it is possible to create an instance of this class.
Returns
boolean
Implementation of
|
public
array
|
#
getTraits( )
Returns traits used by this class.
Returns traits used by this class.
Returns
array
Implementation of
|
public
array
|
#
getOwnTraits( )
Returns traits used by this class and not its parents.
Returns traits used by this class and not its parents.
Returns
array
Implementation of
|
public
array
|
#
getTraitNames( )
Returns names of used traits.
Returns names of used traits.
Returns
array
Implementation of
|
public
array
|
#
getOwnTraitNames( )
Returns traits used by this class and not its parents.
Returns traits used by this class and not its parents.
Returns
array
Implementation of
|
public
array
|
#
getTraitAliases( )
Returns method aliases from traits.
Returns method aliases from traits.
Returns
array
Implementation of
|
public
boolean
|
#
isTrait( )
Returns if the class is a trait.
Returns if the class is a trait.
Returns
boolean
Implementation of
|
public
boolean
|
#
usesTrait( ReflectionClass|TokenReflection\IReflectionClass |string $trait )
Returns if the class uses a particular trait.
Returns if the class uses a particular trait.
Parameters
Returns
boolean
Implementation of
|
public
boolean
|
#
isCloneable( )
Returns if objects of this class are cloneable.
Returns if objects of this class are cloneable.
Introduced in PHP 5.4.
Returns
boolean
See
Implementation of
|
public
boolean
|
#
isIterateable( )
Returns if the class is iterateable.
Returns if the class is iterateable.
Returns true if the class implements the Traversable interface.
Returns
boolean
Implementation of
|
public
boolean
|
#
isInternal( )
Returns if the reflection object is internal.
Returns if the reflection object is internal.
Returns
boolean
Implementation of
|
public
boolean
|
#
isUserDefined( )
Returns if the reflection object is user defined.
Returns if the reflection object is user defined.
Returns
boolean
Implementation of
|
public
boolean
|
#
isTokenized( )
Returns if the current reflection comes from a tokenized source.
Returns if the current reflection comes from a tokenized source.
Returns
boolean
Implementation of
|
public
boolean
|
#
isSubclassOf( string|object $class )
Returns if the current class is a subclass of the given class.
Returns if the current class is a subclass of the given class.
Parameters
- $class
string|object $class Class name or reflection object
Returns
boolean
Implementation of
|
public
null
|
#
getParentClass( )
Returns the parent class reflection.
Returns the parent class reflection.
Returns
null
Implementation of
|
public
array
|
#
getParentClasses( )
Returns the parent classes reflections.
Returns the parent classes reflections.
Returns
array
Implementation of
|
public
array
|
#
getParentClassNameList( )
Returns the parent classes names.
Returns the parent classes names.
Returns
array
Implementation of
|
public
null
|
#
getParentClassName( )
Returns the parent class reflection.
Returns the parent class reflection.
Returns
null
Implementation of
|
public
boolean
|
#
implementsInterface( string|object $interface )
Returns if the class implements the given interface.
Returns if the class implements the given interface.
Parameters
- $interface
string|object $interface Interface name or reflection object
Returns
boolean
Throws
Implementation of
|
public
array
|
#
getInterfaces( )
Returns interface reflections.
Returns interface reflections.
Returns
array
Implementation of
|
public
array
|
|
public
array
|
#
getOwnInterfaces( )
Returns interfaces implemented by this class, not its parents.
Returns interfaces implemented by this class, not its parents.
Returns
array
Implementation of
|
public
array
|
#
getOwnInterfaceNames( )
Returns names of interfaces implemented by this class, not its parents.
Returns names of interfaces implemented by this class, not its parents.
Returns
array
Implementation of
|
public
null
|
#
getConstructor( )
Returns the class constructor reflection.
Returns the class constructor reflection.
Returns
null
Implementation of
|
public
null
|
#
getDestructor( )
Returns the class desctructor reflection.
Returns the class desctructor reflection.
Returns
null
Implementation of
|
public
boolean
|
#
hasMethod( string $name )
Returns if the class implements the given method.
Returns if the class implements the given method.
Parameters
- $name
string $name Method name
Returns
boolean
Implementation of
|
public
TokenReflection\IReflectionMethod
|
#
getMethod( string $name )
Returns a method reflection.
Returns a method reflection.
Parameters
- $name
string $name Method name
Returns
Throws
Implementation of
|
public
array
|
#
getMethods( integer $filter = null )
Returns method reflections.
Returns method reflections.
Parameters
- $filter
integer $filter Methods filter
Returns
array
Implementation of
|
public
boolean
|
#
hasOwnMethod( string $name )
Returns if the class implements (and not its parents) the given method.
Returns if the class implements (and not its parents) the given method.
Parameters
- $name
string $name Method name
Returns
boolean
Implementation of
|
public
array
|
#
getOwnMethods( integer $filter = null )
Returns methods declared by this class, not its parents.
Returns methods declared by this class, not its parents.
Parameters
- $filter
integer $filter Methods filter
Returns
array
Implementation of
|
public
boolean
|
#
hasTraitMethod( string $name )
Returns if the class imports the given method from traits.
Returns if the class imports the given method from traits.
Parameters
- $name
string $name Method name
Returns
boolean
Implementation of
|
public
array
|
#
getTraitMethods( integer $filter = null )
Returns method reflections imported from traits.
Returns method reflections imported from traits.
Parameters
- $filter
integer $filter Methods filter
Returns
array
Implementation of
|
public
boolean
|
#
hasConstant( string $name )
Returns if the class defines the given constant.
Returns if the class defines the given constant.
Parameters
- $name
string $name Constant name.
Returns
boolean
Implementation of
|
public
mixed
|
#
getConstant( string $name )
Returns a constant value.
Returns a constant value.
Parameters
- $name
string $name Constant name
Returns
mixed
Throws
Implementation of
|
public
TokenReflection\IReflectionConstant
|
#
getConstantReflection( string $name )
Returns a constant reflection.
Returns a constant reflection.
Parameters
- $name
string $name Constant name
Returns
Throws
Implementation of
|
public
array
|
#
getConstants( )
Returns an array of constant values.
Returns an array of constant values.
Returns
array
Implementation of
|
public
array
|
#
getConstantReflections( )
Returns an array of constant reflections.
Returns an array of constant reflections.
Returns
array
Implementation of
|
public
boolean
|
#
hasOwnConstant( string $name )
Returns if the class (and not its parents) defines the given constant.
Returns if the class (and not its parents) defines the given constant.
Parameters
- $name
string $name Constant name.
Returns
boolean
Implementation of
|
public
array
|
#
getOwnConstants( )
Returns constants declared by this class, not its parents.
Returns constants declared by this class, not its parents.
Returns
array
Implementation of
|
public
array
|
#
getOwnConstantReflections( )
Returns an array of constant reflections defined by this class not its
parents.
Returns an array of constant reflections defined by this class not its
parents.
Returns
array
Implementation of
|
public
array
|
#
getDefaultProperties( )
Returns default properties.
Returns default properties.
Returns
array
Implementation of
|
public
boolean
|
#
hasProperty( string $name )
Returns if the class implements the given property.
Returns if the class implements the given property.
Parameters
- $name
string $name Property name
Returns
boolean
Implementation of
|
public
array
|
#
getProperties( integer $filter = null )
Returns class properties.
Returns class properties.
Parameters
- $filter
integer $filter Property types
Returns
array
Implementation of
|
public
TokenReflection\ReflectionProperty
|
#
getProperty( string $name )
Return a property reflections.
Return a property reflections.
Parameters
- $name
string $name Property name
Returns
Throws
Implementation of
|
public
boolean
|
#
hasOwnProperty( string $name )
Returns if the class (and not its parents) implements the given property.
Returns if the class (and not its parents) implements the given property.
Parameters
- $name
string $name Property name
Returns
boolean
Implementation of
|
public
array
|
#
getOwnProperties( integer $filter = null )
Returns properties declared by this class, not its parents.
Returns properties declared by this class, not its parents.
Parameters
- $filter
integer $filter Properties filter
Returns
array
Implementation of
|
public
boolean
|
#
hasTraitProperty( string $name )
Returns if the class imports the given property from traits.
Returns if the class imports the given property from traits.
Parameters
- $name
string $name Property name
Returns
boolean
Implementation of
|
public
array
|
#
getTraitProperties( integer $filter = null )
Returns property reflections imported from traits.
Returns property reflections imported from traits.
Parameters
- $filter
integer $filter Properties filter
Returns
array
Implementation of
|
public
array
|
#
getStaticProperties( )
Returns static properties reflections.
Returns static properties reflections.
Returns
array
Implementation of
|
public
mixed
|
#
getStaticPropertyValue( string $name, mixed $default = null )
Returns a value of a static property.
Returns a value of a static property.
Parameters
- $name
string $name Property name
- $default
mixed $default Default value
Returns
mixed
Throws
Implementation of
|
public
array
|
#
getDirectSubclasses( )
Returns reflections of direct subclasses.
Returns reflections of direct subclasses.
Returns
array
Implementation of
|
public
array
|
#
getDirectSubclassNames( )
Returns names of direct subclasses.
Returns names of direct subclasses.
Returns
array
Implementation of
|
public
array
|
#
getIndirectSubclasses( )
Returns reflections of indirect subclasses.
Returns reflections of indirect subclasses.
Returns
array
Implementation of
|
public
array
|
#
getIndirectSubclassNames( )
Returns names of indirect subclasses.
Returns names of indirect subclasses.
Returns
array
Implementation of
|
public
array
|
#
getDirectImplementers( )
Returns reflections of classes directly implementing this interface.
Returns reflections of classes directly implementing this interface.
Returns
array
Implementation of
|
public
array
|
#
getDirectImplementerNames( )
Returns names of classes directly implementing this interface.
Returns names of classes directly implementing this interface.
Returns
array
Implementation of
|
public
array
|
#
getIndirectImplementers( )
Returns reflections of classes indirectly implementing this interface.
Returns reflections of classes indirectly implementing this interface.
Returns
array
Implementation of
|
public
array
|
#
getIndirectImplementerNames( )
Returns names of classes indirectly implementing this interface.
Returns names of classes indirectly implementing this interface.
Returns
array
Implementation of
|
public
boolean
|
#
isInstance( object $object )
Returns if the given object is an instance of this class.
Returns if the given object is an instance of this class.
Parameters
- $object
object $object Instance
Returns
boolean
Throws
Implementation of
|
public
object
|
#
newInstanceWithoutConstructor( )
Creates a new class instance without using a constructor.
Creates a new class instance without using a constructor.
Returns
object
Throws
Implementation of
|
public
object
|
#
newInstance( mixed $args )
Creates a new instance using variable number of parameters.
Creates a new instance using variable number of parameters.
Use any number of constructor parameters as function parameters.
Parameters
Returns
object
Implementation of
|
public
object
|
#
newInstanceArgs( array $args = array() )
Creates a new instance using an array of parameters.
Creates a new instance using an array of parameters.
Parameters
- $args
array $args Array of constructor parameters
Returns
object
Throws
Implementation of
|
public
|
#
setStaticPropertyValue( string $name, mixed $value )
Sets a static property value.
Sets a static property value.
Parameters
- $name
string $name Property name
- $value
mixed $value Property value
Throws
Implementation of
|
public
string
|
#
__toString( )
Returns the string representation of the reflection object.
Returns the string representation of the reflection object.
Returns
string
Implementation of
|
public static
string|null
|
#
export( TokenReflection\Broker $broker, string|object $className, boolean $return = false )
Exports a reflected object.
Exports a reflected object.
Parameters
- $broker
TokenReflection\Broker
$broker Broker instance
- $className
string|object $className Class name or class instance
- $return
boolean $return Return the export instead of outputting it
Returns
string|null
Throws
|
public
string
|
#
getSource( )
Outputs the reflection subject source code.
Outputs the reflection subject source code.
Returns
string
|
public
integer
|
#
getStartPosition( )
Returns the start position in the file token stream.
Returns the start position in the file token stream.
Returns
integer
|
public
integer
|
#
getEndPosition( )
Returns the end position in the file token stream.
Returns the end position in the file token stream.
Returns
integer
|
public
boolean
|
#
isComplete( )
Returns if the class definition is complete.
Returns if the class definition is complete.
Invalid classes are always complete.
Returns
boolean
Implementation of
|
public
boolean
|
#
isValid( )
Returns if the class definition is valid.
Returns if the class definition is valid.
Returns
boolean
Implementation of
|
public
boolean
|
#
isDeprecated( )
Returns if the reflection subject is deprecated.
Returns if the reflection subject is deprecated.
Returns
boolean
Implementation of
|
public
TokenReflection\Broker
|
#
getBroker( )
Returns the reflection broker used by this reflection object.
Returns the reflection broker used by this reflection object.
Returns
Implementation of
|
final public
mixed
|
#
__get( string $key )
Magic __get method.
Parameters
- $key
string $key Variable name
Returns
mixed
Implementation of
|
final public
boolean
|
#
__isset( string $key )
Magic __isset method.
Parameters
- $key
string $key Variable name
Returns
boolean
Implementation of
|