Path: blob/master/src/applications/auth/factor/PhabricatorAuthFactorResult.php
12256 views
<?php12final class PhabricatorAuthFactorResult3extends Phobject {45private $answeredChallenge;6private $isWait = false;7private $isError = false;8private $isContinue = false;9private $errorMessage;10private $value;11private $issuedChallenges = array();12private $icon;13private $statusChallenge;1415public function setAnsweredChallenge(PhabricatorAuthChallenge $challenge) {16if (!$challenge->getIsAnsweredChallenge()) {17throw new PhutilInvalidStateException('markChallengeAsAnswered');18}1920if ($challenge->getIsCompleted()) {21throw new Exception(22pht(23'A completed challenge was provided as an answered challenge. '.24'The underlying factor is implemented improperly, challenges '.25'may not be reused.'));26}2728$this->answeredChallenge = $challenge;2930return $this;31}3233public function getAnsweredChallenge() {34return $this->answeredChallenge;35}3637public function setStatusChallenge(PhabricatorAuthChallenge $challenge) {38$this->statusChallenge = $challenge;39return $this;40}4142public function getStatusChallenge() {43return $this->statusChallenge;44}4546public function getIsValid() {47return (bool)$this->getAnsweredChallenge();48}4950public function setIsWait($is_wait) {51$this->isWait = $is_wait;52return $this;53}5455public function getIsWait() {56return $this->isWait;57}5859public function setIsError($is_error) {60$this->isError = $is_error;61return $this;62}6364public function getIsError() {65return $this->isError;66}6768public function setIsContinue($is_continue) {69$this->isContinue = $is_continue;70return $this;71}7273public function getIsContinue() {74return $this->isContinue;75}7677public function setErrorMessage($error_message) {78$this->errorMessage = $error_message;79return $this;80}8182public function getErrorMessage() {83return $this->errorMessage;84}8586public function setValue($value) {87$this->value = $value;88return $this;89}9091public function getValue() {92return $this->value;93}9495public function setIcon(PHUIIconView $icon) {96$this->icon = $icon;97return $this;98}99100public function getIcon() {101return $this->icon;102}103104}105106107