From fc44076e1edb32e8da65cf664f73ba43abfa2b02 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 13 Dec 2019 11:09:52 +0100 Subject: [PATCH] [PropertyAccess] Update the method directives --- components/property_access.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/components/property_access.rst b/components/property_access.rst index c18eccdcd30..5c91e343204 100644 --- a/components/property_access.rst +++ b/components/property_access.rst @@ -21,7 +21,7 @@ Usage ----- The entry point of this component is the -:method:`PropertyAccess::createPropertyAccessor` +:method:`Symfony\\Component\\PropertyAccess\\PropertyAccess::createPropertyAccessor` factory. This factory will create a new instance of the :class:`Symfony\\Component\\PropertyAccess\\PropertyAccessor` class with the default configuration:: @@ -34,8 +34,8 @@ Reading from Arrays ------------------- You can read an array with the -:method:`PropertyAccessor::getValue` -method. This is done using the index notation that is used in PHP:: +:method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue` method. +This is done using the index notation that is used in PHP:: // ... $person = [ @@ -175,7 +175,7 @@ Accessing a non Existing Property Path Symfony 4.3. By default a :class:`Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException` -is thrown if the property path passed to :method:`PropertyAccessor::getValue` +is thrown if the property path passed to :method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue` does not exist. You can change this behavior using the :method:`Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder::disableExceptionOnInvalidPropertyPath` method:: @@ -259,7 +259,7 @@ enable this feature by using :class:`Symfony\\Component\\PropertyAccess\\Propert .. caution:: The ``__call()`` feature is disabled by default, you can enable it by calling - :method:`PropertyAccessorBuilder::enableMagicCall` + :method:`Symfony\\Component\\PropertyAccess\\PropertyAccessorBuilder::enableMagicCall` see `Enable other Features`_. Writing to Arrays @@ -267,8 +267,7 @@ Writing to Arrays The ``PropertyAccessor`` class can do more than just read an array, it can also write to an array. This can be achieved using the -:method:`PropertyAccessor::setValue` -method:: +:method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::setValue` method:: // ... $person = []; @@ -404,10 +403,9 @@ Checking Property Paths ----------------------- 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:: +:method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue` can +safely be called without actually calling that method, you can use +:method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable` instead:: $person = new Person(); @@ -415,9 +413,8 @@ instead:: // ... } -The same is possible for :method:`PropertyAccessor::setValue`: -Call the -:method:`PropertyAccessor::isWritable` +The same is possible for :method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::setValue`: +Call the :method:`Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable` method to find out whether a property path can be updated:: $person = new Person();