Method |
Description |
|
__clone ( ) |
|
|
__toString ( ) : string |
Get a string representation of this reflection |
|
addMethod ( string $methodName ) |
Add a new method to the class. |
|
addProperty ( string $propertyName, integer $visibility = ReflectionProperty::IS_PUBLIC, boolean $static = false ) |
Add a new property to the class. |
|
createFromInstance ( object $instance ) : ReflectionClass |
Create a ReflectionClass from an instance, using default reflectors etc. |
|
createFromName ( string $className ) : ReflectionClass |
Create a ReflectionClass by name, using default reflectors etc. |
|
createFromNode ( BetterReflection\Reflector\Reflector $reflector, ClassLike $node, BetterReflection\SourceLocator\Located\LocatedSource $locatedSource, Namespace_ $namespace = null ) : ReflectionClass |
Create from a Class Node. |
|
export ( string $className = null ) : string |
Create a reflection and return the string representation of a named class |
|
getAst ( ) : ClassLike |
Retrieve the AST node for this class |
|
getConstant ( string $name ) : mixed | null |
Get the value of the specified class constant. |
|
getConstants ( ) : mixed[] |
Get an array of the defined constants in this class. |
|
getConstructor ( ) : BetterReflection\Reflection\ReflectionMethod |
Get the constructor method for this class. |
|
getDefaultProperties ( ) |
|
|
getDocComment ( ) : string |
|
|
getEndLine ( ) : integer |
Get the line number that this class ends on. |
|
getFileName ( ) : string | null |
|
|
getImmediateInterfaces ( ) : ReflectionClass[] |
Get only the interfaces that this class implements (i.e. do not search
up parent classes etc.) |
|
getImmediateMethods ( ) : BetterReflection\Reflection\ReflectionMethod[] |
Get only the methods that this class implements (i.e. do not search
up parent classes etc.) |
|
getInterfaceNames ( ) : string[] |
Gets the interface names. |
|
getInterfaces ( ) : ReflectionClass[] |
Gets the interfaces. |
|
getLocatedSource ( ) : BetterReflection\SourceLocator\Located\LocatedSource |
|
|
getMethod ( string $methodName ) : BetterReflection\Reflection\ReflectionMethod |
Get a single method with the name $methodName. |
|
getMethods ( ) : BetterReflection\Reflection\ReflectionMethod[] |
Fetch an array of all methods for this class. |
|
getModifiers ( ) : integer |
Get the core-reflection-compatible modifier values. |
|
getName ( ) : string |
Get the "full" name of the class (e.g. for A\B\Foo, this will return
"A\B\Foo"). |
|
getNamespaceName ( ) : string |
Get the "namespace" name of the class (e.g. for A\B\Foo, this will
return "A\B"). |
|
getParentClass ( ) : ReflectionClass |
Get the parent class, if it is defined. If this class does not have a
specified parent class, this will throw an exception. |
|
getProperties ( ) : ReflectionProperty[] |
Get the properties for this class. |
|
getProperty ( string $name ) : ReflectionProperty | null |
Get the property called $name. |
|
getShortName ( ) : string |
Get the "short" name of the class (e.g. for A\B\Foo, this will return
"Foo"). |
|
getStartLine ( ) : integer |
Get the line number that this class starts on. |
|
getStaticPropertyValue ( string $propertyName ) : mixed |
Get the value of a static property, if it exists. Throws a
PropertyDoesNotExist exception if it does not exist or is not static. |
|
getTraitAliases ( ) : string[] |
Return a list of the aliases used when importing traits for this class. |
|
getTraitNames ( ) : string[] |
Get the names of the traits used as an array of strings, if any are
defined. If this class does not have any defined traits, this will
return an empty array. |
|
getTraits ( ) : ReflectionClass[] |
Get the traits used, if any are defined. If this class does not have any
defined traits, this will return an empty array. |
|
hasConstant ( string $name ) : boolean |
Does this class have the specified constant? |
|
hasMethod ( string $methodName ) : boolean |
Does the class have the specified method method? |
|
hasProperty ( string $name ) : boolean |
Does this class have the specified property? |
|
implementsInterface ( string $interfaceName ) : boolean |
Checks whether this class implements the given interface. |
|
inNamespace ( ) : boolean |
Decide if this class is part of a namespace. Returns false if the class
is in the global namespace or does not have a specified namespace. |
|
isAbstract ( ) : boolean |
Is this class an abstract class. |
|
isCloneable ( ) : boolean |
Checks whether this is a reflection of a class that supports the clone operator |
|
isFinal ( ) : boolean |
Is this class a final class. |
|
isInstance ( object $object ) : boolean |
Checks whether the given object is an instance. |
|
isInstantiable ( ) : boolean |
Checks whether this reflection is an instantiable class |
|
isInterface ( ) : boolean |
Is this reflection an interface? |
|
isInternal ( ) : boolean |
Is this an internal class? |
|
isIterateable ( ) : boolean |
Checks if iterateable |
|
isSubclassOf ( string $className ) : boolean |
Checks whether the given class string is a subclass of this class. |
|
isTrait ( ) : boolean |
Is this reflection a trait? |
|
isUserDefined ( ) : boolean |
Is this a user-defined function (will always return the opposite of
whatever isInternal returns). |
|
removeMethod ( string $methodName ) : boolean |
Remove the named method from the class. |
|
removeProperty ( string $propertyName ) : boolean |
Remove a property from the class. |
|
setFinal ( boolean $isFinal ) |
Set whether this class is final or not |
|
setStaticPropertyValue ( string $propertyName, mixed $value ) : void |
Set the value of a static property |
|