mirror of
https://github.com/friendica/friendica
synced 2025-04-24 05:10:11 +00:00
Extend IHandleUserSessions
from IHandleSessions
and adapt classes
This commit is contained in:
parent
b72d727a06
commit
b5bc1b0844
14 changed files with 165 additions and 138 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue