The ReflectionObject class

Introduction

The ReflectionObject class reports information about an object.

Class synopsis

ReflectionObject
extends ReflectionClass
/* Inherited constants */
public const int ReflectionClass::IS_IMPLICIT_ABSTRACT;
public const int ReflectionClass::IS_EXPLICIT_ABSTRACT;
public const int ReflectionClass::IS_FINAL;
public const int ReflectionClass::IS_READONLY;
public const int ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE;
public const int ReflectionClass::SKIP_DESTRUCTOR;
/* Inherited properties */
public string $name;
/* Methods */
public ReflectionObject::__construct(object $object)
/* Inherited methods */
public static string export(mixed $argument, bool $return = false)
public array getAttributes(stringnull $name = null, int $flags = 0)
public mixed getConstant(string $name)
public array getConstants(intnull $filter = null)
public ReflectionMethodnull getConstructor()
public array getDefaultProperties()
public stringfalse getDocComment()
public intfalse getEndLine()
public ReflectionExtensionnull getExtension()
public stringfalse getExtensionName()
public stringfalse getFileName()
public array getInterfaceNames()
public array getInterfaces()
public callablenull getLazyInitializer(object $object)
public ReflectionMethod getMethod(string $name)
public array getMethods(intnull $filter = null)
public int getModifiers()
public string getName()
public string getNamespaceName()
public ReflectionClassfalse getParentClass()
public array getProperties(intnull $filter = null)
public ReflectionProperty getProperty(string $name)
public ReflectionClassConstantfalse getReflectionConstant(string $name)
public array getReflectionConstants(intnull $filter = null)
public string getShortName()
public intfalse getStartLine()
public array getStaticProperties()
public mixed getStaticPropertyValue(string $name, mixed &$def_value = ?)
public array getTraitAliases()
public array getTraitNames()
public array getTraits()
public bool hasConstant(string $name)
public bool hasMethod(string $name)
public bool hasProperty(string $name)
public bool implementsInterface(ReflectionClassstring $interface)
public object initializeLazyObject(object $object)
public bool inNamespace()
public bool isAbstract()
public bool isAnonymous()
public bool isCloneable()
public bool isEnum()
public bool isFinal()
public bool isInstance(object $object)
public bool isInstantiable()
public bool isInterface()
public bool isInternal()
public bool isIterable()
public bool isReadOnly()
public bool isSubclassOf(ReflectionClassstring $class)
public bool isTrait()
public bool isUninitializedLazyObject(object $object)
public bool isUserDefined()
public object markLazyObjectAsInitialized(object $object)
public object newInstance(mixed ...$args)
public objectnull newInstanceArgs(array $args = [])
public object newInstanceWithoutConstructor()
public object newLazyGhost(callable $initializer, int $options = 0)
public object newLazyProxy(callable $factory, int $options = 0)
public void resetAsLazyGhost(object $object, callable $initializer, int $options = 0)
public void resetAsLazyProxy(object $object, callable $factory, int $options = 0)
public void setStaticPropertyValue(string $name, mixed $value)
public string __toString()

Changelog

Version Description
8.0.0 ReflectionObject::export was removed.
Table of Contents