From 319bf2935113d28840007e49b5702b0c2f683156 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 12 Apr 2014 10:38:34 -0400 Subject: [PATCH 1/2] [#3729] Making minor changes thansk to @WouterJ and @xabbuh. --- components/property_access/introduction.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/property_access/introduction.rst b/components/property_access/introduction.rst index 2fabbf2119b..7b1193cb9fa 100644 --- a/components/property_access/introduction.rst +++ b/components/property_access/introduction.rst @@ -314,12 +314,13 @@ Checking Property Paths .. versionadded:: 2.5 The methods - :method:`PropertyAccessor::isReadable` + :method:`PropertyAccessor::isReadable ` and - :method:`PropertyAccessor::isWritable` - methods were added in Symfony 2.5. + :method:`PropertyAccessor::isWritable ` + methods were introduced in Symfony 2.5. -When you want to check whether :method:`PropertyAccessor::getValue` +When you want to check whether +:method:`PropertyAccessor::getValue` can safely be called without actually calling that method, you can use :method:`PropertyAccessor::isReadable` instead:: From fb9fe9971ebcf414a819f129c53c6ff7407967b5 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 12 Apr 2014 10:38:43 -0400 Subject: [PATCH 2/2] [#3729] Removing 3rd argument to isWritable - this doesn't exist in the final merged item --- components/property_access/introduction.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/property_access/introduction.rst b/components/property_access/introduction.rst index 7b1193cb9fa..dfd457f7d4d 100644 --- a/components/property_access/introduction.rst +++ b/components/property_access/introduction.rst @@ -334,12 +334,11 @@ instead:: The same is possible for :method:`PropertyAccessor::setValue`: Call the :method:`PropertyAccessor::isWritable` -method to find out whether a property path can be updated. In the third -argument, you should pass the value that you want to write:: +method to find out whether a property path can be updated:: $person = new Person(); - if ($accessor->isWritable($person, 'firstName', 'Wouter') { + if ($accessor->isWritable($person, 'firstName') { // ... }