]> git.mxchange.org Git - friendica.git/blob - src/Core/Session/Memory.php
Overwrite constructor of Memory session handling so no session ini-setting in backend...
[friendica.git] / src / Core / Session / Memory.php
1 <?php
2
3 namespace Friendica\Core\Session;
4
5 use Friendica\Core\Config\Configuration;
6 use Friendica\Model\User\Cookie;
7
8 /**
9  * Usable for backend processes (daemon/worker) and testing
10  *
11  * @todo after replacing the last direct $_SESSION call, use a internal array instead of the global variable
12  */
13 final class Memory extends Native
14 {
15         public function __construct(Configuration $config, Cookie $cookie)
16         {
17                 $this->cookie = $cookie;
18         }
19
20         public function start()
21         {
22                 // Backward compatibility until all Session variables are replaced
23                 // with the Session class
24                 $_SESSION = [];
25                 $this->clear();
26                 return $this;
27         }
28 }