Skip to content

Commit 95fd311

Browse files
committed
Fix local variable in session example
1 parent 4b4385b commit 95fd311

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

session.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ controllers if you type-hint an argument with
146146
public function someMethod()
147147
{
148148
// stores an attribute in the session for later reuse
149-
$session->set('attribute-name', 'attribute-value');
149+
$this->session->set('attribute-name', 'attribute-value');
150150

151151
// gets an attribute by name
152-
$foo = $session->get('foo');
152+
$foo = $this->session->get('foo');
153153

154154
// the second argument is the value returned when the attribute doesn't exist
155-
$filters = $session->get('filters', []);
155+
$filters = $this->session->get('filters', []);
156156

157157
// ...
158158
}

0 commit comments

Comments
 (0)