PropertyAccessorInterface::isWritable()

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

Returns whether a value can be written at a given property path.

Whenever this method returns true, {@link setValue()} 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 value can be set

Exceptions

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

Please login to continue.