/**
* Constructor.
*
* The input array must be in the form: array(-42 => true, 3 => true, 4 => false)
* or an equivalent JSON encoded string.
*
* @param mixed $identities A JSON format string (probably from the database) or a named array.
*
* @since 1.7.0
*/
public function __construct($identities)
{
// Convert string input to an array.
if (\is_string($identities)) {
$identities = json_decode($identities, true);
}
$this->mergeIdentities($identities);
}