PropertyAccessorInterface::isReadable()

bool isReadable(object|array $objectOrArray, string|PropertyPathInterface $propertyPath)

Returns whether a property path can be read from an object graph.

Whenever this method returns true, {@link getValue()} is guaranteed not to throw an exception when called with the same arguments.

Parameters

object|array $objectOrArray The object or array to check
string|PropertyPathInterface $propertyPath The property path to check

Return Value

bool Whether the property path can be read

Exceptions

InvalidArgumentException If the property path is invalid
doc_Symfony
2016-10-28 06:27:49
Comments
Leave a Comment

Please login to continue.