public function unserialize(string $input, ?string &$name = null): JWE
    {
        foreach ($this->serializers as $serializer) {
            try {
                $jws = $serializer->unserialize($input);
                $name = $serializer->name();

                return $jws;
            } catch (\InvalidArgumentException $e) {
                continue;
            }
        }

        throw new \InvalidArgumentException('Unsupported input.');
    }
public function unserialize(string $input, ?string &$name = null): JWE
    {
        foreach ($this->serializers as $serializer) {
            try {
                $jws = $serializer->unserialize($input);
                $name = $serializer->name();

                return $jws;
            } catch (\InvalidArgumentException $e) {
                continue;
            }
        }

        throw new \InvalidArgumentException('Unsupported input.');
    }
public function unserialize ( string $ input , ? string & $ name = null ) : JWE { foreach ( $ this -> serializers as $ serializer ) { try { $ jws = $ serializer -> unserialize ( $ input ) ; $ name = $ serializer -> name ( ) ; return $ jws ; } catch ( \ InvalidArgumentException $ e ) { continue ; } } throw new \ InvalidArgumentException ( 'Unsupported input.' ) ; }
Loads data and return a JWE object.
Throws an exception if none of the serializer was able to convert the input.

@param string      $input A string that represents a JWE
@param string|null $name  the name of the serializer if the input is unserialized

@throws \Exception
Loads data and return a JWE object . Throws an exception if none of the serializer was able to convert the input .