Skip to content

Commit 547792c

Browse files
committed
Add _get and _set notes for Entity class. Closes #1568
1 parent c4aab8c commit 547792c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

user_guide_src/source/models/entities.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ The first thing to notice is the name of the methods we've added. For each one,
181181
column name to be converted into PascalCase, and prefixed with either ``set`` or ``get``. These methods will then
182182
be automatically called whenever you set or retrieve the class property using the direct syntax (i.e. $user->email).
183183
The methods do not need to be public unless you want them accessed from other classes. For example, the ``created_at``
184-
class property will be access through the ``setCreatedAt()`` and ``getCreatedAt()`` methods.
184+
class property will be accessed through the ``setCreatedAt()`` and ``getCreatedAt()`` methods.
185+
186+
.. note:: This only works when trying to access the properties from outside of the track. Any methods internal to the
187+
class must call the ``setX()`` and ``getX()`` methods directly.
185188

186189
In the ``setPassword()`` method we ensure that the password is always hashed.
187190

0 commit comments

Comments
 (0)