Extend IHandleUserSessions from IHandleSessions and adapt classes

This commit is contained in:
Philipp 2022-10-23 20:41:17 +02:00
parent b72d727a06
commit b5bc1b0844
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
14 changed files with 165 additions and 138 deletions

View file

@ -25,6 +25,9 @@ use Friendica\Core\Session\Capability\IHandleSessions;
use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\Model\Contact;
/**
* This class handles user sessions, which is directly extended from regular session
*/
class UserSession implements IHandleUserSessions
{
/** @var IHandleSessions */
@ -130,4 +133,52 @@ class UserSession implements IHandleUserSessions
{
$this->session->set('submanage', $managed_uid);
}
/** {@inheritDoc} */
public function start(): IHandleSessions
{
return $this;
}
/** {@inheritDoc} */
public function exists(string $name): bool
{
return $this->session->exists($name);
}
/** {@inheritDoc} */
public function get(string $name, $defaults = null)
{
return $this->session->get($name, $defaults);
}
/** {@inheritDoc} */
public function pop(string $name, $defaults = null)
{
return $this->session->pop($name, $defaults);
}
/** {@inheritDoc} */
public function set(string $name, $value)
{
$this->session->set($name, $value);
}
/** {@inheritDoc} */
public function setMultiple(array $values)
{
$this->session->setMultiple($values);
}
/** {@inheritDoc} */
public function remove(string $name)
{
$this->session->remove($name);
}
/** {@inheritDoc} */
public function clear()
{
$this->session->clear();
}
}