challenge = $challenge; $this->identifier = $identifier; $this->otp = $otp; } /** * @return string */ public function getChallenge() { return $this->challenge; } /** * @return string */ public function getIdentifier() { return $this->identifier; } /** * @return string */ public function getOtp() { return $this->otp; } /** * @param $array * * @return AuthenticationChallenge */ public static function fromArray($array) { $challenge = $array['challenge'] ?: null; $identifier = $array['identifier'] ?: null; $otp = $array['otp'] ?: null; return new AuthenticationChallenge($challenge, $identifier, $otp); } }