# $session

The session object can be used to store visitor preferences for your site throughout various requests.

****

- Full class name: `Kirby\Session\SessionData`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Session/SessionData.php#L19>

****

### $session

- [new Session()](https://getkirby.com/docs/reference/objects/session/session-data/__construct.md)
- [$session->clear()](https://getkirby.com/docs/reference/objects/session/session-data/clear.md)
- [$session->decrement()](https://getkirby.com/docs/reference/objects/session/session-data/decrement.md)
- [$session->get()](https://getkirby.com/docs/reference/objects/session/session-data/get.md)
- [$session->increment()](https://getkirby.com/docs/reference/objects/session/session-data/increment.md)
- [$session->pull()](https://getkirby.com/docs/reference/objects/session/session-data/pull.md)
- [$session->reload()](https://getkirby.com/docs/reference/objects/session/session-data/reload.md)
- [$session->remove()](https://getkirby.com/docs/reference/objects/session/session-data/remove.md)
- [$session->set()](https://getkirby.com/docs/reference/objects/session/session-data/set.md)

## How to get the `$session` object

The `$session` object is available via the `$kirby` object:

```php
$session = $kirby->session();
```