The ReflectionObject class

(PHP 5, PHP 7)

Introduction

The ReflectionObject class reports information about an object.

Class synopsis

ReflectionObject extends ReflectionClass implements Reflector {
/* Inherited constants */
const int ReflectionClass::IS_FINAL = 64 ;
/* Properties */
public $name ;
/* Methods */
public __construct ( object $object )
public static export ( string $argument , bool $return = ? ) : string
/* Inherited methods */
public static ReflectionClass::export ( mixed $argument , bool $return = false ) : string
public ReflectionClass::getConstant ( string $name ) : mixed
public ReflectionClass::getConstants ( int|null $filter = null ) : array
public ReflectionClass::getDocComment ( ) : string|false
public ReflectionClass::getEndLine ( ) : int|false
public ReflectionClass::getExtensionName ( ) : string|false
public ReflectionClass::getFileName ( ) : string|false
public ReflectionClass::getInterfaces ( ) : array
public ReflectionClass::getMethod ( string $name ) : ReflectionMethod
public ReflectionClass::getMethods ( int|null $filter = null ) : array
public ReflectionClass::getName ( ) : string
public ReflectionClass::getProperties ( int|null $filter = null ) : array
public ReflectionClass::getReflectionConstants ( int|null $filter = null ) : array
public ReflectionClass::getShortName ( ) : string
public ReflectionClass::getStartLine ( ) : int|false
public ReflectionClass::getStaticProperties ( ) : array|null
public ReflectionClass::getStaticPropertyValue ( string $name , mixed &$def_value = ? ) : mixed
public ReflectionClass::getTraitNames ( ) : array
public ReflectionClass::getTraits ( ) : array
public ReflectionClass::hasConstant ( string $name ) : bool
public ReflectionClass::hasMethod ( string $name ) : bool
public ReflectionClass::hasProperty ( string $name ) : bool
public ReflectionClass::implementsInterface ( ReflectionClass|string $interface ) : bool
public ReflectionClass::inNamespace ( ) : bool
public ReflectionClass::isAbstract ( ) : bool
public ReflectionClass::isAnonymous ( ) : bool
public ReflectionClass::isCloneable ( ) : bool
public ReflectionClass::isFinal ( ) : bool
public ReflectionClass::isInstance ( object $object ) : bool
public ReflectionClass::isInterface ( ) : bool
public ReflectionClass::isInternal ( ) : bool
public ReflectionClass::isIterable ( ) : bool
public ReflectionClass::isSubclassOf ( ReflectionClass|string $class ) : bool
public ReflectionClass::isTrait ( ) : bool
public ReflectionClass::newInstance ( mixed ...$args ) : object
public ReflectionClass::newInstanceArgs ( array $args = [] ) : object
public ReflectionClass::setStaticPropertyValue ( string $name , mixed $value ) : void
public ReflectionClass::__toString ( ) : string
}

Properties

name

Name of the object's class. Read-only, throws ReflectionException in attempt to write.

Table of Contents