1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php /** * * This file is part of Aura for PHP. * * @license http://opensource.org/licenses/bsd-license.php BSD * */ namespace Aura\Session;
/** * * A factory to create a Session manager. * * @package Aura.Session * */ class SessionFactory { /** * * Creates a new Session manager. * * @param array $cookies An array of cookie values, typically $_COOKIE. * * @param callable|null $delete_cookie Optional: An alternative callable * to invoke when deleting the session cookie. Defaults to `null`. * * @return Session New Session manager instance */ public function newInstance(array $cookies, $delete_cookie = null) { $phpfunc = new Phpfunc; return new Session( new SegmentFactory, new CsrfTokenFactory(new Randval($phpfunc)), $phpfunc, $cookies, $delete_cookie ); } }
|