PHP Class BetterReflection\Reflection\ReflectionObject

Inheritance: extends ReflectionClass
Afficher le fichier Open project: roave/better-reflection Class Usage Examples

Méthodes publiques

Méthode Description
__clone ( )
addMethod ( $methodName )
addProperty ( $methodName, $visibility = 'public', $static = false )
createFromInstance ( object $object ) : ReflectionClass Pass an instance of an object to this method to reflect it
createFromName ( $className ) Cannot instantiate this way, use ReflectionObject::createFromInstance
createFromNode ( BetterReflection\Reflector\Reflector $reflector, ClassLike $node, BetterReflection\SourceLocator\Located\LocatedSource $locatedSource, Namespace_ $namespace = null ) Cannot instantiate this way, use ReflectionObject::createFromInstance
export ( object $instance = null ) : string Create a reflection and return the string representation of a class instance
getAst ( )
getConstant ( $name )
getConstants ( )
getConstructor ( )
getDefaultProperties ( )
getDocComment ( )
getEndLine ( )
getFileName ( )
getImmediateInterfaces ( )
getImmediateMethods ( )
getInterfaceNames ( )
getInterfaces ( )
getLocatedSource ( )
getMethod ( $methodName )
getMethods ( )
getModifiers ( )
getName ( )
getNamespaceName ( )
getParentClass ( )
getProperties ( )
getProperty ( $name )
getShortName ( )
getStartLine ( )
getStaticPropertyValue ( $propertyName )
getTraitAliases ( )
getTraitNames ( )
getTraits ( )
hasConstant ( $name )
hasMethod ( $methodName )
hasProperty ( $name )
implementsInterface ( $interfaceName )
inNamespace ( )
isAbstract ( )
isCloneable ( )
isFinal ( )
isInstance ( $object )
isInstantiable ( )
isInterface ( )
isInternal ( )
isIterateable ( )
isSubclassOf ( $className )
isTrait ( )
isUserDefined ( )
removeMethod ( $methodName )
removeProperty ( $methodName )
setFinal ( $isFinal )
setStaticPropertyValue ( $propertyName, $value )

Private Methods

Méthode Description
__construct ( BetterReflection\Reflector\Reflector $reflector, ReflectionClass $reflectionClass, $object )
createPropertyNodeFromReflection ( ReflectionProperty $property, object $instance ) : Property Create an AST PropertyNode given a reflection
getRuntimeProperties ( ) : ReflectionProperty[] Reflect on runtime properties for the current instance

Method Details

__clone() public méthode

public __clone ( )

addMethod() public méthode

public addMethod ( $methodName )

addProperty() public méthode

public addProperty ( $methodName, $visibility = 'public', $static = false )

createFromInstance() public static méthode

Pass an instance of an object to this method to reflect it
public static createFromInstance ( object $object ) : ReflectionClass
$object object
Résultat ReflectionClass

createFromName() public static méthode

Cannot instantiate this way, use ReflectionObject::createFromInstance
public static createFromName ( $className )

createFromNode() public static méthode

Cannot instantiate this way, use ReflectionObject::createFromInstance
public static createFromNode ( BetterReflection\Reflector\Reflector $reflector, ClassLike $node, BetterReflection\SourceLocator\Located\LocatedSource $locatedSource, Namespace_ $namespace = null )
$reflector BetterReflection\Reflector\Reflector
$node PhpParser\Node\Stmt\ClassLike
$locatedSource BetterReflection\SourceLocator\Located\LocatedSource
$namespace PhpParser\Node\Stmt\Namespace_

export() public static méthode

Create a reflection and return the string representation of a class instance
public static export ( object $instance = null ) : string
$instance object
Résultat string

getAst() public méthode

public getAst ( )

getConstant() public méthode

public getConstant ( $name )

getConstants() public méthode

public getConstants ( )

getConstructor() public méthode

public getConstructor ( )

getDefaultProperties() public méthode

getDocComment() public méthode

public getDocComment ( )

getEndLine() public méthode

public getEndLine ( )

getFileName() public méthode

public getFileName ( )

getImmediateInterfaces() public méthode

getImmediateMethods() public méthode

public getImmediateMethods ( )

getInterfaceNames() public méthode

public getInterfaceNames ( )

getInterfaces() public méthode

public getInterfaces ( )

getLocatedSource() public méthode

public getLocatedSource ( )

getMethod() public méthode

public getMethod ( $methodName )

getMethods() public méthode

public getMethods ( )

getModifiers() public méthode

public getModifiers ( )

getName() public méthode

public getName ( )

getNamespaceName() public méthode

public getNamespaceName ( )

getParentClass() public méthode

public getParentClass ( )

getProperties() public méthode

public getProperties ( )

getProperty() public méthode

public getProperty ( $name )

getShortName() public méthode

public getShortName ( )

getStartLine() public méthode

public getStartLine ( )

getStaticPropertyValue() public méthode

public getStaticPropertyValue ( $propertyName )

getTraitAliases() public méthode

public getTraitAliases ( )

getTraitNames() public méthode

public getTraitNames ( )

getTraits() public méthode

public getTraits ( )

hasConstant() public méthode

public hasConstant ( $name )

hasMethod() public méthode

public hasMethod ( $methodName )

hasProperty() public méthode

public hasProperty ( $name )

implementsInterface() public méthode

public implementsInterface ( $interfaceName )

inNamespace() public méthode

public inNamespace ( )

isAbstract() public méthode

public isAbstract ( )

isCloneable() public méthode

public isCloneable ( )

isFinal() public méthode

public isFinal ( )

isInstance() public méthode

public isInstance ( $object )

isInstantiable() public méthode

public isInstantiable ( )

isInterface() public méthode

public isInterface ( )

isInternal() public méthode

public isInternal ( )

isIterateable() public méthode

public isIterateable ( )

isSubclassOf() public méthode

public isSubclassOf ( $className )

isTrait() public méthode

public isTrait ( )

isUserDefined() public méthode

public isUserDefined ( )

removeMethod() public méthode

public removeMethod ( $methodName )

removeProperty() public méthode

public removeProperty ( $methodName )

setFinal() public méthode

public setFinal ( $isFinal )

setStaticPropertyValue() public méthode

public setStaticPropertyValue ( $propertyName, $value )