Documentation

Analyzer
in package

Analyzer is a class for manipulating attributes using Reflection

Tags
final

Table of Contents

getAllProperties()  : array<string|int, ReflectionProperty>
Gets the ReflectionProperty of all attributes of an object
getPropertyAccessIfExists()  : ReflectionProperty|false
Gets the ReflectionProperty of an object attribute if it exists

Methods

getAllProperties()

Gets the ReflectionProperty of all attributes of an object

public static getAllProperties(object $instance) : array<string|int, ReflectionProperty>
Parameters
$instance : object

Object for accessing variables

Tags
access

public

Return values
array<string|int, ReflectionProperty> —

ReflectionProperty list of all object attributes

getPropertyAccessIfExists()

Gets the ReflectionProperty of an object attribute if it exists

public static getPropertyAccessIfExists(string $name, object $instance) : ReflectionProperty|false
Parameters
$name : string

Variable you want to get (The _ character is disregarded in the variable name)

$instance : object

Object for variable access

Tags
access

public

Return values
ReflectionProperty|false —

ReflectionProperty fetched or false if attribute doesn't exist

Search results