lithium\storage\session\adapter\Php::delete()

public method

Delete value from the session

Parameters

  • string $key

    The key to be deleted.

  • array $options

    Options array. Not used for this adapter method.

Returns

\Closure

Function returning boolean true if the key no longer exists in the session, false otherwise

Source

	public function delete($key, array $options = []) {
		if (!$this->isStarted() && !$this->_start()) {
			throw new RuntimeException('Could not start session.');
		}
		return function($params) {
			$key = $params['key'];
			$this->overwrite($_SESSION, Set::remove($_SESSION, $key));
			return !Set::check($_SESSION, $key);
		};
	}