You are here

public function MemberMetadata::getReflectionMember in Plug 7

Returns the reflection instance for accessing the member's value.

Parameters

object|string $objectOrClassName The object or the class name:

Return value

\ReflectionMethod|\ReflectionProperty The reflection instance

File

lib/Symfony/validator/Symfony/Component/Validator/Mapping/MemberMetadata.php, line 231

Class

MemberMetadata
Stores all metadata needed for validating a class property.

Namespace

Symfony\Component\Validator\Mapping

Code

public function getReflectionMember($objectOrClassName) {
  $className = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName);
  if (!isset($this->reflMember[$className])) {
    $this->reflMember[$className] = $this
      ->newReflectionMember($objectOrClassName);
  }
  return $this->reflMember[$className];
}