src/Utilities/Reflection.php
public static function getProperty($class, $property, $filter = null)
    {
        $className = self::getClassName($class);
        $properties = self::getProperties($className, $filter);

        if (!empty($properties)) {
            /** @var \ReflectionProperty $reflectionProperty */
            foreach ($properties as $reflectionProperty) {
                if ($reflectionProperty->getName() === $property) {
                    return $reflectionProperty;
                }
            }
        }

        return null;
    }
public static function getProperty($class, $property, $filter = null)
    {
        $className = self::getClassName($class);
        $properties = self::getProperties($className, $filter);

        if (!empty($properties)) {
            /** @var \ReflectionProperty $reflectionProperty */
            foreach ($properties as $reflectionProperty) {
                if ($reflectionProperty->getName() === $property) {
                    return $reflectionProperty;
                }
            }
        }

        return null;
    }
public static function getProperty ( $ class , $ property , $ filter = null ) { $ className = self :: getClassName ( $ class ) ; $ properties = self :: getProperties ( $ className , $ filter ) ; if ( ! empty ( $ properties ) ) { /** @var \ReflectionProperty $reflectionProperty */ foreach ( $ properties as $ reflectionProperty ) { if ( $ reflectionProperty -> getName ( ) === $ property ) { return $ reflectionProperty ; } } } return null ; }
Returns property, the \ReflectionProperty instance, of given object

@param array|object|string $class    An array of objects, namespaces, object or namespace
@param string              $property Name of the property
@param int                 $filter   (optional) Filter of properties. Uses \ReflectionProperty class constants.
By default all properties are allowed / processed.
@return null|\ReflectionProperty
Returns property the \ ReflectionProperty instance of given object