Convert SessionManager to a factory class
This commit is contained in:
parent
5b0ee7651b
commit
de8c5e5dc7
10 changed files with 64 additions and 52 deletions
27
classes/Factory/SessionFactory.php
Normal file
27
classes/Factory/SessionFactory.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* SessionFactory class.
|
||||
*/
|
||||
|
||||
namespace Alltube\Factory;
|
||||
|
||||
use Aura\Session\Session;
|
||||
|
||||
/**
|
||||
* Manage sessions.
|
||||
*/
|
||||
class SessionFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* Get the current session.
|
||||
*
|
||||
* @return Session
|
||||
*/
|
||||
public static function create()
|
||||
{
|
||||
$session_factory = new \Aura\Session\SessionFactory();
|
||||
return $session_factory->newInstance($_COOKIE);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue