You are here

interface RocketChatStateinterface in Rocket.Chat 8.2

Hierarchy

Expanded class hierarchy of RocketChatStateinterface

All classes that implement RocketChatStateinterface

4 files declare their use of RocketChatStateinterface
Channels.php in modules/rocket_chat_api/src/RocketChat/Collection/Channels.php
Groups.php in modules/rocket_chat_api/src/RocketChat/Collection/Groups.php
User.php in modules/rocket_chat_api/src/RocketChat/Element/User.php
Users.php in modules/rocket_chat_api/src/RocketChat/Collection/Users.php

File

modules/rocket_chat_api/src/RocketChat/RocketChatStateinterface.php, line 7

Namespace

Drupal\rocket_chat_api\RocketChat
View source
interface RocketChatStateinterface {

  /**
   * Returns the stored value for a given key.
   *
   * @param string $key
   *   The key of the data to retrieve.
   * @param mixed $default
   *   The default value to use if the key is not found.
   *
   * @return mixed
   *   The stored value, or NULL if no value exists.
   */
  public function get($key, $default = NULL);

  /**
   * Returns the stored key/value pairs for a given set of keys.
   *
   * @param array $keys
   *   A list of keys to retrieve.
   *
   * @return array
   *   An associative array of items successfully returned, indexed by key.
   */
  public function getMultiple(array $keys);

  /**
   * Saves a value for a given key.
   *
   * @param string $key
   *   The key of the data to store.
   * @param mixed $value
   *   The data to store.
   */
  public function set($key, $value);

  /**
   * Saves key/value pairs.
   *
   * @param array $data
   *   An associative array of key/value pairs.
   */
  public function setMultiple(array $data);

  /**
   * Deletes an item.
   *
   * @param string $key
   *   The item name to delete.
   */
  public function delete($key);

  /**
   * Deletes multiple items.
   *
   * @param array $keys
   *   A list of item names to delete.
   */
  public function deleteMultiple(array $keys);

  /**
   * Resets the static cache.
   *
   * This is mainly used in testing environments.
   */
  public function resetCache();

}

Members

Namesort descending Modifiers Type Description Overrides
RocketChatStateinterface::delete public function Deletes an item. 1
RocketChatStateinterface::deleteMultiple public function Deletes multiple items. 1
RocketChatStateinterface::get public function Returns the stored value for a given key. 1
RocketChatStateinterface::getMultiple public function Returns the stored key/value pairs for a given set of keys. 1
RocketChatStateinterface::resetCache public function Resets the static cache. 1
RocketChatStateinterface::set public function Saves a value for a given key. 1
RocketChatStateinterface::setMultiple public function Saves key/value pairs. 1