Methods |
protected
|
__construct(Reflector $reflector, ReflectionClass $reflectionClass, object $object)
|
#
|
public
static
|
createFromInstance(object $instance): ReflectionClass
Pass an instance of an object to this method to reflect it
Pass an instance of an object to this method to reflect it
Throws
Overrides
|
#
|
public
|
getShortName(): string
Get the "short" name of the class (e.g. for A\B\Foo, this will return
"Foo").
Get the "short" name of the class (e.g. for A\B\Foo, this will return
"Foo").
Overrides
|
#
|
public
|
getName(): string
Get the "full" name of the class (e.g. for A\B\Foo, this will return
"A\B\Foo").
Get the "full" name of the class (e.g. for A\B\Foo, this will return
"A\B\Foo").
Overrides
|
#
|
public
|
getNamespaceName(): ?string
Get the "namespace" name of the class (e.g. for A\B\Foo, this will
return "A\B").
Get the "namespace" name of the class (e.g. for A\B\Foo, this will
return "A\B").
Overrides
|
#
|
public
|
inNamespace(): bool
Decide if this class is part of a namespace. Returns false if the class
is in the global namespace or does not have a…
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.
Overrides
|
#
|
public
|
getExtensionName(): ?string
|
#
|
public
|
getMethods(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
getImmediateMethods(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
getMethod(non-empty-string $methodName): ?ReflectionMethod
Get a single method with the name $methodName.
Get a single method with the name $methodName.
Overrides
|
#
|
public
|
hasMethod(non-empty-string $methodName): bool
Does the class have the specified method?
Does the class have the specified method?
Overrides
|
#
|
public
|
getImmediateConstants(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
getConstants(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
hasConstant(string $name): bool
Does this class have the specified constant?
Does this class have the specified constant?
Overrides
|
#
|
public
|
getConstant(string $name): ?ReflectionClassConstant
Get the reflection object of the specified class constant.
Get the reflection object of the specified class constant.
Returns null if not specified.
Overrides
|
#
|
public
|
getConstructor(): ?ReflectionMethod
Get the constructor method for this class.
Get the constructor method for this class.
Overrides
|
#
|
public
|
getProperties(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
getImmediateProperties(int $filter = 0): array
{@inheritdoc}
|
#
|
public
|
getProperty(string $name): ?ReflectionProperty
Get the property called $name.
Get the property called $name.
Returns null if property does not exist.
Overrides
|
#
|
public
|
hasProperty(string $name): bool
Does this class have the specified property?
Does this class have the specified property?
Overrides
|
#
|
public
|
getDefaultProperties(): array
{@inheritdoc}
|
#
|
public
|
getFileName(): ?string
|
#
|
public
|
getLocatedSource(): LocatedSource
|
#
|
public
|
getStartLine(): int
Get the line number that this class starts on.
Get the line number that this class starts on.
Overrides
|
#
|
public
|
getEndLine(): int
Get the line number that this class ends on.
Get the line number that this class ends on.
Overrides
|
#
|
public
|
getStartColumn(): int
|
#
|
public
|
getEndColumn(): int
|
#
|
public
|
getParentClass(): ?ReflectionClass
Get the parent class, if it is defined. If this class does not have a
specified parent class, this will throw an…
Get the parent class, if it is defined. If this class does not have a
specified parent class, this will throw an exception.
Overrides
|
#
|
public
|
getParentClassNames(): array
{@inheritdoc}
Returns
A numerical array with parent class names as the values.
Overrides
|
#
|
public
|
getDocComment(): ?string
|
#
|
public
|
isAnonymous(): bool
|
#
|
public
|
isInternal(): bool
Is this an internal class?
Is this an internal class?
Overrides
|
#
|
public
|
isUserDefined(): bool
Is this a user-defined function (will always return the opposite of
whatever isInternal returns).
Is this a user-defined function (will always return the opposite of
whatever isInternal returns).
Overrides
|
#
|
public
|
isDeprecated(): bool
|
#
|
public
|
isAbstract(): bool
Is this class an abstract class.
Is this class an abstract class.
Overrides
|
#
|
public
|
isFinal(): bool
Is this class a final class.
Is this class a final class.
Overrides
|
#
|
public
|
isReadOnly(): bool
|
#
|
public
|
getModifiers(): int
Get the core-reflection-compatible modifier values.
Get the core-reflection-compatible modifier values.
Overrides
|
#
|
public
|
isTrait(): bool
Is this reflection a trait?
Is this reflection a trait?
Overrides
|
#
|
public
|
isInterface(): bool
Is this reflection an interface?
Is this reflection an interface?
Overrides
|
#
|
public
|
getTraits(): array
{@inheritdoc}
|
#
|
public
|
getTraitNames(): array
{@inheritdoc}
|
#
|
public
|
getTraitAliases(): array
{@inheritdoc}
|
#
|
public
|
getInterfaces(): array
{@inheritdoc}
Returns
An associative array of interfaces, with keys as interface names and the array
values as {@see ReflectionClass} objects.
Overrides
|
#
|
public
|
getImmediateInterfaces(): array
{@inheritdoc}
|
#
|
public
|
getInterfaceNames(): array
{@inheritdoc}
Returns
A numerical array with interface names as the values.
Overrides
|
#
|
public
|
isInstance(object $object): bool
Checks whether the given object is an instance.
Checks whether the given object is an instance.
Overrides
|
#
|
public
|
isSubclassOf(string $className): bool
Checks whether the given class string is a subclass of this class.
Checks whether the given class string is a subclass of this class.
Overrides
|
#
|
public
|
implementsInterface(string $interfaceName): bool
Checks whether this class implements the given interface.
Checks whether this class implements the given interface.
Overrides
|
#
|
public
|
isInstantiable(): bool
Checks whether this reflection is an instantiable class
Checks whether this reflection is an instantiable class
Overrides
|
#
|
public
|
isCloneable(): bool
Checks whether this is a reflection of a class that supports the clone operator
Checks whether this is a reflection of a class that supports the clone operator
Overrides
|
#
|
public
|
isIterateable(): bool
Checks if iterateable
|
#
|
public
|
isEnum(): bool
|
#
|
public
|
getStaticProperties(): array
{@inheritdoc}
|
#
|
public
|
setStaticPropertyValue(string $propertyName, mixed $value): void
Set the value of a static property
Set the value of a static property
Overrides
|
#
|
public
|
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…
Get the value of a static property, if it exists. Throws a
PropertyDoesNotExist exception if it does not exist or is not static.
(note, differs very slightly from internal reflection behaviour)
Overrides
|
#
|
public
|
getAttributes(): list<ReflectionAttribute>
|
#
|
public
|
getAttributesByName(string $name): list<ReflectionAttribute>
|
#
|
public
|
getAttributesByInstance(class-string $className): list<ReflectionAttribute>
|
#
|