class ReflectionService implements ReflectionServiceInterface (View source)

Default implementation of ReflectionServiceInterface

Traits

Implements ReflectionServiceInterface readMethod & writeMethodrelated methods
Implements methods of ReflectionServiceInterface related to property values
Implements ReflectionServiceInterface getReflectionProperty()
Singleton pattern trait

Methods

getPropertyValues($object, $flags = 0)

No description

populateClassPropertiyValues($properties, ReflectionClass $class, $object, $flags = 0, ReflectionClass $derivedClass = null)

No description

getPropertyValue($object, $property, $flags = 0)

No description

populatePropertyValue($value, $object, $property, $flags = 0, ReflectionClass $derivedClass = null)

No description

setPropertyValues($object, $values, $flags = 0)

No description

getReflectionProperty($class, $propertyName, $flags = 0)

No description

static $this
getInstance()

Get the class singleton instance

__construct()

No description

getReflectionClass(string|object $classNameOrObject)

Get reflection class for the given class name or object.

Details

findReadMethodForProperty(ReflectionClass $class, $propertyName)

Parameters

ReflectionClass $class
$propertyName

findWriteMethodForProperty(ReflectionClass $class, $propertyName)

Parameters

ReflectionClass $class
$propertyName

setReadMethodPrefixes($list)

Parameters

$list

setWriteMethodPrefixes($list)

Parameters

$list

getPropertyValues($object, $flags = 0)

Parameters

$object
$flags

protected populateClassPropertiyValues($properties, ReflectionClass $class, $object, $flags = 0, ReflectionClass $derivedClass = null)

Parameters

$properties
ReflectionClass $class
$object
$flags
ReflectionClass $derivedClass

getPropertyValue($object, $property, $flags = 0)

Parameters

$object
$property
$flags

protected populatePropertyValue($value, $object, $property, $flags = 0, ReflectionClass $derivedClass = null)

Parameters

$value
$object
$property
$flags
ReflectionClass $derivedClass

setPropertyValues($object, $values, $flags = 0)

Parameters

$object
$values
$flags

getReflectionProperty($class, $propertyName, $flags = 0)

Parameters

$class
$propertyName
$flags

static $this getInstance()

Get the class singleton instance

Return Value

$this Class singleton instance. If the singleton was not created yet, the instance will be created by calling the class constructor with the arguments given to the getInstance() method

__construct()

ReflectionClass getReflectionClass(string|object $classNameOrObject)

Get reflection class for the given class name or object.

Parameters

string|object $classNameOrObject Class name or Class instance

Return Value

ReflectionClass