namespace Friendica\Core\Session;
-use Friendica\Model\User\Cookie;
-
/**
* Usable for backend processes (daemon/worker) and testing
*
*/
final class Memory extends AbstractSession implements ISession
{
- public function __construct(Cookie $cookie)
+ public function __construct()
{
- parent::__construct($cookie);
-
// Backward compatibility until all Session variables are replaced
// with the Session class
$_SESSION = [];
*/
final class Native extends AbstractSession implements ISession
{
- public function __construct(App\BaseURL $baseURL, Cookie $cookie, SessionHandlerInterface $handler = null)
+ public function __construct(App\BaseURL $baseURL, SessionHandlerInterface $handler = null)
{
- parent::__construct($cookie);
-
ini_set('session.gc_probability', 50);
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_httponly', (int)Cookie::HTTPONLY);
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Database\Database;
-use Friendica\Model\User\Cookie;
use Friendica\Util\Profiler;
use Psr\Log\LoggerInterface;
* @param App\Mode $mode
* @param App\BaseURL $baseURL
* @param Configuration $config
- * @param Cookie $cookie
* @param Database $dba
* @param ICache $cache
* @param LoggerInterface $logger
*
* @return Session\ISession
*/
- public function createSession(App\Mode $mode, App\BaseURL $baseURL, Configuration $config, Cookie $cookie, Database $dba, ICache $cache, LoggerInterface $logger, Profiler $profiler, array $server = [])
+ public function createSession(App\Mode $mode, App\BaseURL $baseURL, Configuration $config, Database $dba, ICache $cache, LoggerInterface $logger, Profiler $profiler, array $server = [])
{
$stamp1 = microtime(true);
$session = null;
try {
if ($mode->isInstall() || $mode->isBackend()) {
- $session = new Session\Memory($cookie);
+ $session = new Session\Memory();
} else {
$session_handler = $config->get('system', 'session_handler', self::HANDLER_DEFAULT);
$handler = null;
break;
}
- $session = new Session\Native($baseURL, $cookie, $handler);
+ $session = new Session\Native($baseURL, $handler);
}
} finally {
$profiler->saveTimestamp($stamp1, 'parser', System::callstack());