| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait SessionTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Register the values into the container |
||
| 13 | * |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | private function registerSessions() |
||
| 17 | { |
||
| 18 | // Set the default session manager |
||
| 19 | $this->set(SessionContract::class, function() { |
||
| 20 | return new SessionManager(); |
||
| 21 | }); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get the session manager |
||
| 26 | * |
||
| 27 | * @return SessionContract |
||
| 28 | */ |
||
| 29 | public function getSessionManager() |
||
| 30 | { |
||
| 31 | return $this->g(SessionContract::class); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Set the session manager |
||
| 36 | * |
||
| 37 | * @param Closure $xClosure A closure to create the session manager instance |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function setSessionManager(Closure $xClosure) |
||
| 44 | } |
||
| 45 | } |
||
| 46 |