You are here

public function StateInterface::get in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/State/StateInterface.php \Drupal\Core\State\StateInterface::get()

Returns the stored value for a given key.

Parameters

string $key: The key of the data to retrieve.

mixed $default: The default value to use if the key is not found.

Return value

mixed The stored value, or NULL if no value exists.

1 method overrides StateInterface::get()
State::get in lib/Drupal/Core/State/State.php
Returns the stored value for a given key.

File

lib/Drupal/Core/State/StateInterface.php, line 28
Contains \Drupal\Core\State\StateInterface.

Class

StateInterface
Defines the interface for the state system.

Namespace

Drupal\Core\State

Code

public function get($key, $default = NULL);