public function setContents(array $data)
	{
		// make sure we have our expire data key
		if (isset($data[static::EXPIRE_DATA_KEY]))
		{
			// process the expiration settings
			foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration)
			{
				// if it was set on the last request, make it as loaded
				if ($expiration[1] === static::EXPIRE_STATE_NEW)
				{
					$data[static::EXPIRE_DATA_KEY][$key][1] = static::EXPIRE_STATE_LOADED;
				}

				// if it was already loaded on the last request, and we expire on request, delete it
				elseif ($expiration[0] === EXPIRE_ON_REQUEST and $expiration[1] === static::EXPIRE_STATE_LOADED)
				{
					unset($data[static::EXPIRE_DATA_KEY][$key]);
					\Arr::delete($data, $this->prefixKey($key));
				}
			}
		}
		else
		{
			// not set, create an empty one to start with
			$data[static::EXPIRE_DATA_KEY] = array();
		}

		// store the data
		parent::setContents($data);
	}
public function setContents(array $data)
	{
		// make sure we have our expire data key
		if (isset($data[static::EXPIRE_DATA_KEY]))
		{
			// process the expiration settings
			foreach($data[static::EXPIRE_DATA_KEY] as $key => $expiration)
			{
				// if it was set on the last request, make it as loaded
				if ($expiration[1] === static::EXPIRE_STATE_NEW)
				{
					$data[static::EXPIRE_DATA_KEY][$key][1] = static::EXPIRE_STATE_LOADED;
				}

				// if it was already loaded on the last request, and we expire on request, delete it
				elseif ($expiration[0] === EXPIRE_ON_REQUEST and $expiration[1] === static::EXPIRE_STATE_LOADED)
				{
					unset($data[static::EXPIRE_DATA_KEY][$key]);
					\Arr::delete($data, $this->prefixKey($key));
				}
			}
		}
		else
		{
			// not set, create an empty one to start with
			$data[static::EXPIRE_DATA_KEY] = array();
		}

		// store the data
		parent::setContents($data);
	}
public function setContents ( array $ data ) { // make sure we have our expire data key if ( isset ( $ data [ static :: EXPIRE_DATA_KEY ] ) ) { // process the expiration settings foreach ( $ data [ static :: EXPIRE_DATA_KEY ] as $ key => $ expiration ) { // if it was set on the last request, make it as loaded if ( $ expiration [ 1 ] === static :: EXPIRE_STATE_NEW ) { $ data [ static :: EXPIRE_DATA_KEY ] [ $ key ] [ 1 ] = static :: EXPIRE_STATE_LOADED ; } // if it was already loaded on the last request, and we expire on request, delete it elseif ( $ expiration [ 0 ] === EXPIRE_ON_REQUEST and $ expiration [ 1 ] === static :: EXPIRE_STATE_LOADED ) { unset ( $ data [ static :: EXPIRE_DATA_KEY ] [ $ key ] ) ; \ Arr :: delete ( $ data , $ this -> prefixKey ( $ key ) ) ; } } } else { // not set, create an empty one to start with $ data [ static :: EXPIRE_DATA_KEY ] = array ( ) ; } // store the data parent :: setContents ( $ data ) ; }
Replaces the container's data

@param array $data

@throws \RuntimeException
Replaces the container s data