public static function read($key = null, array $options = []) {
		$defaults = ['name' => null, 'strategies' => true];
		$options += $defaults;
		$method = ($name = $options['name']) ? static::adapter($name)->read($key, $options) : null;
		$settings = static::_config($name);

		if (!$method) {
			foreach (array_keys(static::$_configurations) as $name) {
				if ($method = static::adapter($name)->read($key, $options)) {
					break;
				}
			}
			if (!$method || !$name) {
				return null;
			}
		}
		$params = compact('key', 'options');

		if (!empty($settings['filters'])) {
			$message  = 'Per adapter filters have been deprecated. Please ';
			$message .= "filter the manager class' static methods instead.";
			trigger_error($message, E_USER_DEPRECATED);

			$result = Filters::bcRun(
				get_called_class(), __FUNCTION__, $params, $method, $settings['filters']
			);
		} else {
			$result = Filters::run(get_called_class(), __FUNCTION__, $params, $method);
		}

		if ($options['strategies']) {
			$options += ['key' => $key, 'mode' => 'LIFO', 'class' => __CLASS__];
			return static::applyStrategies(__FUNCTION__, $name, $result, $options);
		}
		return $result;
	}
public static function read($key = null, array $options = []) {
		$defaults = ['name' => null, 'strategies' => true];
		$options += $defaults;
		$method = ($name = $options['name']) ? static::adapter($name)->read($key, $options) : null;
		$settings = static::_config($name);

		if (!$method) {
			foreach (array_keys(static::$_configurations) as $name) {
				if ($method = static::adapter($name)->read($key, $options)) {
					break;
				}
			}
			if (!$method || !$name) {
				return null;
			}
		}
		$params = compact('key', 'options');

		if (!empty($settings['filters'])) {
			$message  = 'Per adapter filters have been deprecated. Please ';
			$message .= "filter the manager class' static methods instead.";
			trigger_error($message, E_USER_DEPRECATED);

			$result = Filters::bcRun(
				get_called_class(), __FUNCTION__, $params, $method, $settings['filters']
			);
		} else {
			$result = Filters::run(get_called_class(), __FUNCTION__, $params, $method);
		}

		if ($options['strategies']) {
			$options += ['key' => $key, 'mode' => 'LIFO', 'class' => __CLASS__];
			return static::applyStrategies(__FUNCTION__, $name, $result, $options);
		}
		return $result;
	}
public static function read ( $ key = null , array $ options = [ ] ) { $ defaults = [ 'name' => null , 'strategies' => true ] ; $ options += $ defaults ; $ method = ( $ name = $ options [ 'name' ] ) ? static :: adapter ( $ name ) -> read ( $ key , $ options ) : null ; $ settings = static :: _config ( $ name ) ; if ( ! $ method ) { foreach ( array_keys ( static :: $ _configurations ) as $ name ) { if ( $ method = static :: adapter ( $ name ) -> read ( $ key , $ options ) ) { break ; } } if ( ! $ method || ! $ name ) { return null ; } } $ params = compact ( 'key' , 'options' ) ; if ( ! empty ( $ settings [ 'filters' ] ) ) { $ message = 'Per adapter filters have been deprecated. Please ' ; $ message .= "filter the manager class' static methods instead." ; trigger_error ( $ message , E_USER_DEPRECATED ) ; $ result = Filters :: bcRun ( get_called_class ( ) , __FUNCTION__ , $ params , $ method , $ settings [ 'filters' ] ) ; } else { $ result = Filters :: run ( get_called_class ( ) , __FUNCTION__ , $ params , $ method ) ; } if ( $ options [ 'strategies' ] ) { $ options += [ 'key' => $ key , 'mode' => 'LIFO' , 'class' => __CLASS__ ] ; return static :: applyStrategies ( __FUNCTION__ , $ name , $ result , $ options ) ; } return $ result ; }
Reads a value from a persistent session store.

@param string $key Key to be read.
@param array $options Optional parameters that this method accepts:
- `'name'` _string_: To force the read from a specific adapter, specify the name
of the configuration (i.e. `'default'`) here.
- `'strategies'` _boolean_: Indicates whether or not a configuration's applied
strategy classes should be enabled for this operation. Defaults to `true`.
@return mixed Read result on successful session read, `null` otherwise.
@filter
Reads a value from a persistent session store .