Compatibility with native reflection API
Method
Supported
getConstant
✔️ Yes (the ::class
constant is now resolved correctly)
getConstants
✔️ Yes
getConstructor
✔️ Yes
getDefaultProperties
✔️ Yes
getDocComment
✔️ Yes
getEndLine
✔️ Yes
getExtension
❌ No - see (#15 )
getExtensionName
✔️ Yes
getFileName
✔️ Yes
getInterfaceNames
✔️ Yes
getInterfaces
✔️ Yes
getMethod
✔️ Yes
getMethods
✔️ Yes
getModifiers
✔️ Yes
getName
✔️ Yes
getNamespaceName
✔️ Yes
getParentClass
✔️ Yes
getProperties
✔️ Yes
getProperty
✔️ Yes
getShortName
✔️ Yes
getStartLine
✔️ Yes
getStaticProperties
✔️ Yes
getStaticPropertyValue
✔️ Yes
getTraitAliases
✔️ Yes
getTraitNames
✔️ Yes
getTraits
✔️ Yes
hasConstant
✔️ Yes
hasMethod
✔️ Yes
hasProperty
✔️ Yes
implementsInterface
✔️ Yes
inNamespace
✔️ Yes
isAbstract
✔️ Yes
isAnonymous
✔️ Yes
isCloneable
✔️ Yes
isFinal
✔️ Yes
isInstance
✔️ Yes
isInstantiable
✔️ Yes
isInterface
✔️ Yes
isInternal
✔️ Yes
isIterateable
✔️ Yes
isSubclassOf
✔️ Yes
isTrait
✔️ Yes
isUserDefined
✔️ Yes
newInstance
❌ No - see (#14 )
newInstanceArgs
❌ No - see (#14 )
newInstanceWithoutConstructor
❌ No - see(#14 )
setStaticPropertyValue
✔️ Yes
ReflectionFunctionAbstract
Method
Supported
getClosureScopeClass
❌ No - see (#14 )
getClosureThis
❌ No - see (#14 )
getDocComment
✔️ Yes
getEndLine
✔️ Yes
getExtension
❌ No - see (#15 )
getExtensionName
✔️ Yes
getFileName
✔️ Yes
getName
✔️ Yes
getNamespaceName
✔️ Yes
getNumberOfParameters
✔️ Yes
getNumberOfRequiredParameters
✔️ Yes
getParameters
✔️ Yes
getShortName
✔️ Yes
getStartLine
✔️ Yes
getStaticVariables
❌ No - see (#14 )
inNamespace
✔️ Yes
isClosure
✔️ Yes
isDeprecated
✔️ Yes
isGenerator
✔️ Yes
isInternal
✔️ Yes
isUserDefined
✔️ Yes
isVariadic
✔️ Yes
returnsReference
✔️ Yes
getReturnType
✔️ Yes
hasReturnType
✔️ Yes
Method
Supported
getClosure
✔️ Yes
getDeclaringClass
✔️ Yes
getModifiers
✔️ Yes
getPrototype
✔️ Yes
invoke
✔️ Yes
invokeArgs
✔️ Yes
isAbstract
✔️ Yes
isConstructor
✔️ Yes
isDestructor
✔️ Yes
isFinal
✔️ Yes
isPrivate
✔️ Yes
isProtected
✔️ Yes
isPublic
✔️ Yes
isStatic
✔️ Yes
setAccessible
✔️ Yes
inherited methods
see ReflectionFunctionAbstract
Method
Supported
allowsNull
✔️ Yes
canBePassedByValue
✔️ Yes
getClass
✔️ Yes
getDeclaringClass
✔️ Yes
getDeclaringFunction
✔️ Yes
getDefaultValue
✔️ Yes (*some assumptions are made)
getDefaultValueConstantName
✔️ Yes
getName
✔️ Yes
getPosition
✔️ Yes
isArray
✔️ Yes
isCallable
✔️ Yes
isDefaultValueAvailable
✔️ Yes
isDefaultValueConstant
✔️ Yes
isOptional
✔️ Yes
isPassedByReference
✔️ Yes
isVariadic
✔️ Yes
getType
✔️ Yes
hasType
✔️ Yes
Method
Supported
getClosure
✔️ Not implemented for closures
invoke
✔️ Not implemented for closures
invokeArgs
✔️ Not implemented for closures
isDisabled
✔️ Yes
inherited methods
see ReflectionFunctionAbstract
Method
Supported
getDeclaringClass
✔️ Yes
getDocComment
✔️ Yes
getModifiers
✔️ Yes
getName
✔️ Yes
getValue
✔️ Yes
isDefault
✔️ Yes
isPrivate
✔️ Yes
isProtected
✔️ Yes
isPublic
✔️ Yes
isStatic
✔️ Yes
setAccessible
✔️ Yes
setValue
✔️ Yes
❌ Will not be implemented
❌ Will not be implemented
Implemented as a wrapper around ReflectionClass
, so the API is the same.
Method
Supported
__toString
✔️ Yes
allowsNull
✔️ Yes
isBuiltin
✔️ Yes
Method
Supported
getArguments
✔️ Yes
getName
✔️ Yes
getTarget
✔️ Yes
isRepeated
✔️ Yes
newInstance
❌ No - see (#1353 )