Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbaa9759

Browse files
committed
bugsymfony#3791 Property access tweaks (weaverryan)
This PR was merged into the master branch.Discussion----------Property access tweaks| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | 2.5+| Fixed tickets |symfony#3729Hi guys!This follows aftersymfony#3729 - it includes several small suggestions made by@wouterj and@xabbuh.Additionally, this removes the 3rd argument to `isWritable`, which was removed in the orignal PR (symfony/symfony#10570) and didn't make it into the final feature.Thanks!Commits-------fb9fe99 [symfony#3729] Removing 3rd argument to isWritable - this doesn't exist in the final merged item319bf29 [symfony#3729] Making minor changes thansk to@wouterj and@xabbuh.
2 parentsd6474fc +fb9fe99 commitbaa9759

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎components/property_access/introduction.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,13 @@ Checking Property Paths
314314

315315
..versionadded::2.5
316316
The methods
317-
:method:`PropertyAccessor::isReadable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
317+
:method:`PropertyAccessor::isReadable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
318318
and
319-
:method:`PropertyAccessor::isWritable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
320-
methods wereadded in Symfony 2.5.
319+
:method:`PropertyAccessor::isWritable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
320+
methods wereintroduced in Symfony 2.5.
321321

322-
When you want to check whether:method:`PropertyAccessor::getValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue>`
322+
When you want to check whether
323+
:method:`PropertyAccessor::getValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue>`
323324
can safely be called without actually calling that method, you can use
324325
:method:`PropertyAccessor::isReadable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
325326
instead::
@@ -333,12 +334,11 @@ instead::
333334
The same is possible for:method:`PropertyAccessor::setValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::setValue>`:
334335
Call the
335336
:method:`PropertyAccessor::isWritable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
336-
method to find out whether a property path can be updated. In the third
337-
argument, you should pass the value that you want to write::
337+
method to find out whether a property path can be updated::
338338

339339
$person = new Person();
340340

341-
if ($accessor->isWritable($person, 'firstName', 'Wouter') {
341+
if ($accessor->isWritable($person, 'firstName') {
342342
// ...
343343
}
344344

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp