$allowMagicGet =
(bool) ($magicMethods & self::ALLOW_MAGIC_GET
);
$hasProperty =
$reflClass->
hasProperty($property);
$camelProp =
$this->
camelize($property);
$getsetter =
lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item)
foreach ($this->accessorPrefixes
as $prefix) { $methodName =
$prefix.
$camelProp;
if ($reflClass->
hasMethod($methodName) &&
$reflClass->
getMethod($methodName)->
getModifiers() &
$this->methodReflectionFlags && !
$reflClass->
getMethod($methodName)->
getNumberOfRequiredParameters()) { $method =
$reflClass->
getMethod($methodName);
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD,
$methodName,
$this->
getReadVisiblityForMethod($method),
$method->
isStatic(), false
);
} } if ($allowGetterSetter &&
$reflClass->
hasMethod($getsetter) && ($reflClass->
getMethod($getsetter)->
getModifiers() &
$this->methodReflectionFlags
)) { $method =
$reflClass->
getMethod($getsetter);
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD,
$getsetter,
$this->
getReadVisiblityForMethod($method),
$method->
isStatic(), false
);
} if ($allowMagicGet &&
$reflClass->
hasMethod('__get'
) && ($reflClass->
getMethod('__get'
)->
getModifiers() &
$this->methodReflectionFlags
)) { return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY,
$property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false
);
}