Documentation

ReflectionHelper
in package

Table of Contents

getProperties()  : array<string|int, ReflectionProperty>
Retrieves all properties (including private ones), from object and all its ancestors.
getProperty()  : ReflectionProperty
Retrieves property by name from object and all its ancestors.

Methods

getProperties()

Retrieves all properties (including private ones), from object and all its ancestors.

public static getProperties(ReflectionClass $ref) : array<string|int, ReflectionProperty>

Standard \ReflectionClass->getProperties() does not return private properties from ancestor classes.

Parameters
$ref : ReflectionClass
Tags
author

muratyaman@gmail.com

see
http://php.net/manual/en/reflectionclass.getproperties.php
Return values
array<string|int, ReflectionProperty>

getProperty()

Retrieves property by name from object and all its ancestors.

public static getProperty(object|string $object, string $name) : ReflectionProperty
Parameters
$object : object|string
$name : string
Tags
throws
PropertyException
throws
ReflectionException
Return values
ReflectionProperty

Search results