nextcloud/lib/private/Session/Session.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2013-05-27 18:50:00 -04:00
<?php
declare(strict_types=1);
2013-05-27 18:50:00 -04:00
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
2013-05-27 18:50:00 -04:00
*/
namespace OC\Session;
use OCP\ISession;
/**
* @template-implements \ArrayAccess<string,mixed>
*/
abstract class Session implements \ArrayAccess, ISession {
2014-03-10 12:15:19 -04:00
/**
* @var bool
*/
protected $sessionClosed = false;
2013-05-28 10:52:40 -04:00
/**
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset): bool {
2013-05-28 10:52:40 -04:00
return $this->exists($offset);
}
/**
* @param mixed $offset
* @return mixed
*/
#[\ReturnTypeWillChange]
2013-05-28 10:52:40 -04:00
public function offsetGet($offset) {
return $this->get($offset);
}
/**
* @param mixed $offset
* @param mixed $value
*/
public function offsetSet($offset, $value): void {
2013-05-28 10:52:40 -04:00
$this->set($offset, $value);
}
/**
* @param mixed $offset
*/
public function offsetUnset($offset): void {
2013-05-28 10:52:40 -04:00
$this->remove($offset);
}
2014-03-10 12:15:19 -04:00
/**
* Close the session and release the lock
*/
public function close() {
$this->sessionClosed = true;
}
2013-05-27 18:50:00 -04:00
}