You are here

public function AuthenticationMultivalueKeyType::serialize in Key 8

Serialize an array of key values into a string.

Parameters

array $array: An array of key values.

Return value

string A serialized string of key values.

Overrides KeyTypeMultivalueInterface::serialize

File

src/Plugin/KeyType/AuthenticationMultivalueKeyType.php, line 84

Class

AuthenticationMultivalueKeyType
Defines a generic key type for authentication with multiple values.

Namespace

Drupal\key\Plugin\KeyType

Code

public function serialize(array $array) {
  return Json::encode($array);
}