Skip to content

Commit

Permalink
Reorder paragraphs into examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crell committed Nov 20, 2024
1 parent 84d54cf commit d10697d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions language/oop5/property-hooks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ print $example->foo;
</simpara>
<example>
<title>Property get expression</title>
<simpara>
This example is equivalent to the previous.
</simpara>
<programlisting role="php">
<![CDATA[
<?php
Expand All @@ -126,15 +129,15 @@ class Example
]]>
</programlisting>
</example>
<simpara>
This example is equivalent to the previous.
</simpara>
<simpara>
If the <literal>set</literal> hook's parameter type is the same as the property type (which is typical),
it may be omitted. In that case, the value to set is automatically given the name <varname>$value</varname>.
</simpara>
<example>
<title>Property set defaults</title>
<simpara>
This example is equivalent to the previous.
</simpara>
<programlisting role="php">
<![CDATA[
<?php
Expand All @@ -155,9 +158,6 @@ class Example
]]>
</programlisting>
</example>
<simpara>
This example is equivalent to the previous.
</simpara>
<simpara>
If the <literal>set</literal> hook is only setting a modified version of the passed in value, then it may
also be simplified to an arrow expression. The value the expression evaluates to will be set on the backing
Expand Down

0 comments on commit d10697d

Please sign in to comment.