public function getMessage($key = null) {
		$result = [];
		if (empty($key)) {
			return $result;
		}

		$sessionKey = $this->_sessionKey . '.' . $key;
		if (!CakeSession::check($sessionKey)) {
			return $result;
		}

		$data = CakeSession::read($sessionKey);
		if (empty($data)) {
			return $result;
		}

		$result = (array)$data;
		if (isAssoc($result)) {
			$result = [$result];
		}

		return $result;
	}
public function getMessage($key = null) {
		$result = [];
		if (empty($key)) {
			return $result;
		}

		$sessionKey = $this->_sessionKey . '.' . $key;
		if (!CakeSession::check($sessionKey)) {
			return $result;
		}

		$data = CakeSession::read($sessionKey);
		if (empty($data)) {
			return $result;
		}

		$result = (array)$data;
		if (isAssoc($result)) {
			$result = [$result];
		}

		return $result;
	}
public function getMessage ( $ key = null ) { $ result = [ ] ; if ( empty ( $ key ) ) { return $ result ; } $ sessionKey = $ this -> _sessionKey . '.' . $ key ; if ( ! CakeSession :: check ( $ sessionKey ) ) { return $ result ; } $ data = CakeSession :: read ( $ sessionKey ) ; if ( empty ( $ data ) ) { return $ result ; } $ result = ( array ) $ data ; if ( isAssoc ( $ result ) ) { $ result = [ $ result ] ; } return $ result ; }
Get list of Flash messages.

@param string $key Key of Flash messages
to obtain list of messages
@return array List of Flash messages.
Get list of Flash messages .