Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/property_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ can use setters, the magic ``__set()`` method or properties to set values::
{
public $firstName;
private $lastName;
private $children = array();
public $children = array();

public function setLastName($name)
public function getLastName()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change. This section is about modifying objects not reading from them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks better.

{
$this->lastName = $name;
return $this->lastName;
}

public function __set($property, $value)
Expand Down
2 changes: 1 addition & 1 deletion service_container/service_decoration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,6 @@ order by configuring the priority of decoration, this can be any integer number

The generated code will be the following::

$this->services['foo'] = new Baz(new Bar(new Foo())));
$this->services['foo'] = new Baz(new Bar(new Foo()));

.. _decorator pattern: https://en.wikipedia.org/wiki/Decorator_pattern