php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
ReflectionClass Class Reference
Inheritance diagram for ReflectionClass:
Reflector Stringable ReflectionEnum ReflectionObject

Public Member Functions

 __construct (object|string $objectOrClass)
 
 __toString ()
 
 getName ()
 
 isInternal ()
 
 isUserDefined ()
 
 isAnonymous ()
 
 isInstantiable ()
 
 isCloneable ()
 
 getFileName ()
 
 getStartLine ()
 
 getEndLine ()
 
 getDocComment ()
 
 getConstructor ()
 
 hasMethod (string $name)
 
 getMethod (string $name)
 
 getMethods (?int $filter=null)
 
 hasProperty (string $name)
 
 getProperty (string $name)
 
 getProperties (?int $filter=null)
 
 hasConstant (string $name)
 
 getConstants (?int $filter=null)
 
 getReflectionConstants (?int $filter=null)
 
 getConstant (string $name)
 
 getReflectionConstant (string $name)
 
 getInterfaces ()
 
 getInterfaceNames ()
 
 isInterface ()
 
 getTraits ()
 
 getTraitNames ()
 
 getTraitAliases ()
 
 isTrait ()
 
 isEnum ()
 
 isAbstract ()
 
 isFinal ()
 
 isReadOnly ()
 
 getModifiers ()
 
 isInstance (object $object)
 
 newInstance (mixed ... $args)
 
 newInstanceWithoutConstructor ()
 
 newInstanceArgs (array $args=[])
 
 newLazyGhost (callable $initializer, int $options=0)
 
 newLazyProxy (callable $factory, int $options=0)
 
 resetAsLazyGhost (object $object, callable $initializer, int $options=0)
 
 resetAsLazyProxy (object $object, callable $factory, int $options=0)
 
 initializeLazyObject (object $object)
 
 isUninitializedLazyObject (object $object)
 
 markLazyObjectAsInitialized (object $object)
 
 getLazyInitializer (object $object)
 
 getParentClass ()
 
 isSubclassOf (ReflectionClass|string $class)
 
 getStaticProperties ()
 
 getStaticPropertyValue (string $name, mixed $default=UNKNOWN)
 
 setStaticPropertyValue (string $name, mixed $value)
 
 getDefaultProperties ()
 
 isIterable ()
 
 isIterateable ()
 
 implementsInterface (ReflectionClass|string $interface)
 
 getExtension ()
 
 getExtensionName ()
 
 inNamespace ()
 
 getNamespaceName ()
 
 getShortName ()
 
 getAttributes (?string $name=null, int $flags=0)
 

Data Fields

const int IS_IMPLICIT_ABSTRACT = UNKNOWN
 
const int IS_EXPLICIT_ABSTRACT = UNKNOWN
 
const int IS_FINAL = UNKNOWN
 
const int IS_READONLY = UNKNOWN
 
const int SKIP_INITIALIZATION_ON_SERIALIZE = UNKNOWN
 
const int SKIP_DESTRUCTOR = UNKNOWN
 
string $name
 

Detailed Description

@not-serializable

Definition at line 239 of file php_reflection.stub.php.

Constructor & Destructor Documentation

◆ __construct()

ReflectionClass::__construct ( object|string $objectOrClass)

Reimplemented in ReflectionEnum.

Definition at line 263 of file php_reflection.stub.php.

Member Function Documentation

◆ __toString()

ReflectionClass::__toString ( )

Implements Stringable.

Definition at line 265 of file php_reflection.stub.php.

◆ getAttributes()

ReflectionClass::getAttributes ( ?string $name = null,
int $flags = 0 )

Definition at line 440 of file php_reflection.stub.php.

◆ getConstant()

ReflectionClass::getConstant ( string $name)

@tentative-return-type

Definition at line 328 of file php_reflection.stub.php.

◆ getConstants()

ReflectionClass::getConstants ( ?int $filter = null)

@tentative-return-type

Definition at line 322 of file php_reflection.stub.php.

◆ getConstructor()

ReflectionClass::getConstructor ( )

@tentative-return-type

Definition at line 298 of file php_reflection.stub.php.

◆ getDefaultProperties()

ReflectionClass::getDefaultProperties ( )

@tentative-return-type

Definition at line 411 of file php_reflection.stub.php.

◆ getDocComment()

ReflectionClass::getDocComment ( )

@tentative-return-type

Definition at line 295 of file php_reflection.stub.php.

◆ getEndLine()

ReflectionClass::getEndLine ( )

@tentative-return-type

Definition at line 292 of file php_reflection.stub.php.

◆ getExtension()

ReflectionClass::getExtension ( )

@tentative-return-type

Definition at line 426 of file php_reflection.stub.php.

◆ getExtensionName()

ReflectionClass::getExtensionName ( )

@tentative-return-type

Definition at line 429 of file php_reflection.stub.php.

◆ getFileName()

ReflectionClass::getFileName ( )

@tentative-return-type

Definition at line 286 of file php_reflection.stub.php.

◆ getInterfaceNames()

ReflectionClass::getInterfaceNames ( )

@tentative-return-type

Definition at line 337 of file php_reflection.stub.php.

◆ getInterfaces()

ReflectionClass::getInterfaces ( )

@tentative-return-type

Definition at line 334 of file php_reflection.stub.php.

◆ getLazyInitializer()

ReflectionClass::getLazyInitializer ( object $object)

Definition at line 393 of file php_reflection.stub.php.

◆ getMethod()

ReflectionClass::getMethod ( string $name)

@tentative-return-type

Definition at line 304 of file php_reflection.stub.php.

◆ getMethods()

ReflectionClass::getMethods ( ?int $filter = null)

@tentative-return-type

Definition at line 307 of file php_reflection.stub.php.

◆ getModifiers()

ReflectionClass::getModifiers ( )

@tentative-return-type

Definition at line 365 of file php_reflection.stub.php.

◆ getName()

ReflectionClass::getName ( )

@tentative-return-type

Definition at line 268 of file php_reflection.stub.php.

◆ getNamespaceName()

ReflectionClass::getNamespaceName ( )

@tentative-return-type

Definition at line 435 of file php_reflection.stub.php.

◆ getParentClass()

ReflectionClass::getParentClass ( )

@tentative-return-type

Definition at line 396 of file php_reflection.stub.php.

◆ getProperties()

ReflectionClass::getProperties ( ?int $filter = null)

@tentative-return-type

Definition at line 316 of file php_reflection.stub.php.

◆ getProperty()

ReflectionClass::getProperty ( string $name)

@tentative-return-type

Definition at line 313 of file php_reflection.stub.php.

◆ getReflectionConstant()

ReflectionClass::getReflectionConstant ( string $name)

@tentative-return-type

Definition at line 331 of file php_reflection.stub.php.

◆ getReflectionConstants()

ReflectionClass::getReflectionConstants ( ?int $filter = null)

@tentative-return-type

Definition at line 325 of file php_reflection.stub.php.

◆ getShortName()

ReflectionClass::getShortName ( )

@tentative-return-type

Definition at line 438 of file php_reflection.stub.php.

◆ getStartLine()

ReflectionClass::getStartLine ( )

@tentative-return-type

Definition at line 289 of file php_reflection.stub.php.

◆ getStaticProperties()

ReflectionClass::getStaticProperties ( )

@tentative-return-type

Definition at line 402 of file php_reflection.stub.php.

◆ getStaticPropertyValue()

ReflectionClass::getStaticPropertyValue ( string $name,
mixed $default = UNKNOWN )

@tentative-return-type

Definition at line 405 of file php_reflection.stub.php.

◆ getTraitAliases()

ReflectionClass::getTraitAliases ( )

@tentative-return-type

Definition at line 349 of file php_reflection.stub.php.

◆ getTraitNames()

ReflectionClass::getTraitNames ( )

@tentative-return-type

Definition at line 346 of file php_reflection.stub.php.

◆ getTraits()

ReflectionClass::getTraits ( )

@tentative-return-type

Definition at line 343 of file php_reflection.stub.php.

◆ hasConstant()

ReflectionClass::hasConstant ( string $name)

@tentative-return-type

Definition at line 319 of file php_reflection.stub.php.

◆ hasMethod()

ReflectionClass::hasMethod ( string $name)

@tentative-return-type

Definition at line 301 of file php_reflection.stub.php.

◆ hasProperty()

ReflectionClass::hasProperty ( string $name)

@tentative-return-type

Definition at line 310 of file php_reflection.stub.php.

◆ implementsInterface()

ReflectionClass::implementsInterface ( ReflectionClass|string $interface)

@tentative-return-type

Definition at line 423 of file php_reflection.stub.php.

◆ initializeLazyObject()

ReflectionClass::initializeLazyObject ( object $object)

Definition at line 387 of file php_reflection.stub.php.

◆ inNamespace()

ReflectionClass::inNamespace ( )

@tentative-return-type

Definition at line 432 of file php_reflection.stub.php.

◆ isAbstract()

ReflectionClass::isAbstract ( )

@tentative-return-type

Definition at line 357 of file php_reflection.stub.php.

◆ isAnonymous()

ReflectionClass::isAnonymous ( )

@tentative-return-type

Definition at line 277 of file php_reflection.stub.php.

◆ isCloneable()

ReflectionClass::isCloneable ( )

@tentative-return-type

Definition at line 283 of file php_reflection.stub.php.

◆ isEnum()

ReflectionClass::isEnum ( )

Definition at line 354 of file php_reflection.stub.php.

◆ isFinal()

ReflectionClass::isFinal ( )

@tentative-return-type

Definition at line 360 of file php_reflection.stub.php.

◆ isInstance()

ReflectionClass::isInstance ( object $object)

@tentative-return-type

Definition at line 368 of file php_reflection.stub.php.

◆ isInstantiable()

ReflectionClass::isInstantiable ( )

@tentative-return-type

Definition at line 280 of file php_reflection.stub.php.

◆ isInterface()

ReflectionClass::isInterface ( )

@tentative-return-type

Definition at line 340 of file php_reflection.stub.php.

◆ isInternal()

ReflectionClass::isInternal ( )

@tentative-return-type

Definition at line 271 of file php_reflection.stub.php.

◆ isIterable()

ReflectionClass::isIterable ( )

@tentative-return-type

Definition at line 414 of file php_reflection.stub.php.

◆ isIterateable()

ReflectionClass::isIterateable ( )

@tentative-return-type @alias ReflectionClass\isIterable

Definition at line 420 of file php_reflection.stub.php.

◆ isReadOnly()

ReflectionClass::isReadOnly ( )

Definition at line 362 of file php_reflection.stub.php.

◆ isSubclassOf()

ReflectionClass::isSubclassOf ( ReflectionClass|string $class)

@tentative-return-type

Definition at line 399 of file php_reflection.stub.php.

◆ isTrait()

ReflectionClass::isTrait ( )

@tentative-return-type

Definition at line 352 of file php_reflection.stub.php.

◆ isUninitializedLazyObject()

ReflectionClass::isUninitializedLazyObject ( object $object)

Definition at line 389 of file php_reflection.stub.php.

◆ isUserDefined()

ReflectionClass::isUserDefined ( )

@tentative-return-type

Definition at line 274 of file php_reflection.stub.php.

◆ markLazyObjectAsInitialized()

ReflectionClass::markLazyObjectAsInitialized ( object $object)

Definition at line 391 of file php_reflection.stub.php.

◆ newInstance()

ReflectionClass::newInstance ( mixed ... $args)

@tentative-return-type

Definition at line 371 of file php_reflection.stub.php.

◆ newInstanceArgs()

ReflectionClass::newInstanceArgs ( array $args = [])

@tentative-return-type

Definition at line 377 of file php_reflection.stub.php.

◆ newInstanceWithoutConstructor()

ReflectionClass::newInstanceWithoutConstructor ( )

@tentative-return-type

Definition at line 374 of file php_reflection.stub.php.

◆ newLazyGhost()

ReflectionClass::newLazyGhost ( callable $initializer,
int $options = 0 )

Definition at line 379 of file php_reflection.stub.php.

◆ newLazyProxy()

ReflectionClass::newLazyProxy ( callable $factory,
int $options = 0 )

Definition at line 381 of file php_reflection.stub.php.

◆ resetAsLazyGhost()

ReflectionClass::resetAsLazyGhost ( object $object,
callable $initializer,
int $options = 0 )

Definition at line 383 of file php_reflection.stub.php.

◆ resetAsLazyProxy()

ReflectionClass::resetAsLazyProxy ( object $object,
callable $factory,
int $options = 0 )

Definition at line 385 of file php_reflection.stub.php.

◆ setStaticPropertyValue()

ReflectionClass::setStaticPropertyValue ( string $name,
mixed $value )

@tentative-return-type

Definition at line 408 of file php_reflection.stub.php.

Field Documentation

◆ $name

string ReflectionClass::$name

Definition at line 259 of file php_reflection.stub.php.

◆ IS_EXPLICIT_ABSTRACT

const int ReflectionClass::IS_EXPLICIT_ABSTRACT = UNKNOWN

@cvalue ZEND_ACC_EXPLICIT_ABSTRACT_CLASS

Definition at line 247 of file php_reflection.stub.php.

◆ IS_FINAL

const int ReflectionClass::IS_FINAL = UNKNOWN

@cvalue ZEND_ACC_FINAL

Definition at line 249 of file php_reflection.stub.php.

◆ IS_IMPLICIT_ABSTRACT

const int ReflectionClass::IS_IMPLICIT_ABSTRACT = UNKNOWN

@cvalue ZEND_ACC_IMPLICIT_ABSTRACT_CLASS

Todo
deprecate

Definition at line 245 of file php_reflection.stub.php.

◆ IS_READONLY

const int ReflectionClass::IS_READONLY = UNKNOWN

@cvalue ZEND_ACC_READONLY_CLASS

Definition at line 251 of file php_reflection.stub.php.

◆ SKIP_DESTRUCTOR

const int ReflectionClass::SKIP_DESTRUCTOR = UNKNOWN

@cvalue ZEND_LAZY_OBJECT_SKIP_DESTRUCTOR

Definition at line 257 of file php_reflection.stub.php.

◆ SKIP_INITIALIZATION_ON_SERIALIZE

const int ReflectionClass::SKIP_INITIALIZATION_ON_SERIALIZE = UNKNOWN

@cvalue ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE

Definition at line 254 of file php_reflection.stub.php.


The documentation for this class was generated from the following file: