readers = $readers; } /** * @inheritDoc */ public function read(string $token): UserToken { foreach ($this->readers as $reader) { try { return $reader->read($token); } catch (UserTokenException $exception) { continue; } } throw new UserTokenException('Composite reader could not read a token'); } }