Mirror
in package
A utility class for getting Reflectors.
Table of Contents
- CONSTANT = 1
- METHOD = 2
- PROPERTY = 8
- STATIC_PROPERTY = 4
- get() : Reflector
- Get a Reflector for a function, class or instance, constant, method or property.
- getClass() : ReflectionClass
- Get a ReflectionClass (or ReflectionObject) if possible.
Constants
CONSTANT
public
mixed
CONSTANT
= 1
METHOD
public
mixed
METHOD
= 2
PROPERTY
public
mixed
PROPERTY
= 8
STATIC_PROPERTY
public
mixed
STATIC_PROPERTY
= 4
Methods
get()
Get a Reflector for a function, class or instance, constant, method or property.
public
static get(mixed $value[, string $member = null ][, int $filter = 15 ]) : Reflector
Optionally, pass a $filter param to restrict the types of members checked. For example, to only Reflectors for static properties and constants, pass:
$filter = Mirror::CONSTANT | Mirror::STATIC_PROPERTY
Parameters
- $value : mixed
-
Class or function name, or variable instance
- $member : string = null
-
Optional: property, constant or method name (default: null)
- $filter : int = 15
-
(default: CONSTANT | METHOD | PROPERTY | STATIC_PROPERTY)
Tags
Return values
Reflector —getClass()
Get a ReflectionClass (or ReflectionObject) if possible.
private
static getClass(mixed $value) : ReflectionClass
Parameters
- $value : mixed