lithium\storage\session\strategy\Encrypt::delete()

public method

Delete encryption method.

Parameters

  • mixed $data

    The data to be encrypted.

  • array $options

    Options for this method.

Returns

string

Returns the deleted data in cleartext.

Source

	public function delete($data, array $options = array()) {
		$class = $options['class'];

		$futureData = $this->read(null, array('key' => null) + $options) ?: array();
		unset($futureData[$options['key']]);

		$payload = empty($futureData) ? null : $this->_encrypt($futureData);

		$class::write('__encrypted', $payload, array('strategies' => false) + $options);
		return $data;
	}