Merge pull request #7921 from DorsetDigital/patch-2

Add missing use statement in Session documentation
This commit is contained in:
Robbie Averill 2018-03-10 11:50:49 +13:00 committed by GitHub
commit 2bef86833f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,7 @@ Otherwise, if you're not in a controller, get the request as a service.
```php
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Core\Injector\Injector;
$request = Injector::inst()->get(HTTPRequest::class);
$session = $request->getSession();