Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions language/oop5/property-hooks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
</listitem>
</orderedlist>
<simpara>
There are two hooks available on all properties: <literal>get</literal> and <literal>set</literal>.
There are two hooks available on non-static properties: <literal>get</literal> and <literal>set</literal>.
They allow overriding the read and write behavior of a property, respectively.
Hooks are available for both typed and untyped properties.
</simpara>
<simpara>
A property may be "backed" or "virtual".
Expand Down Expand Up @@ -228,7 +229,7 @@ class Example
</example>
<simpara>
For virtual properties, if a hook is omitted then that operation does
not exist and trying to use it wil produce an error.
not exist and trying to use it will produce an error.
Virtual properties take up no memory space in an object.
Virtual properties are suited for "derived" properties,
such as those that are the combination of two other properties.
Expand Down