<?php
namespace App\AuthenticateFromLidia\Webservice\GetCredentials; class Response extends \App\AuthenticateFromLidia\Webservice\ResponseAbstract { protected $username; protected $idUserLidia; public function setUsername($username) { $this->username = $username; return $this; } public function setIdUserLidia($idUserLidia) { $this->idUserLidia = $idUserLidia; return $this; } public function getUsername() { return $this->username; } public function getIdUserLidia() { return $this->idUserLidia; } protected function doCheck(\App\MessagesCollector $msgs) { if ($this->status == 'ok' && !$this->username) { $msgs->addError(sprintf("The status is `%s`, but username is not set.", $this->status)); } if ($this->status == 'ok' && !$this->idUserLidia) { $msgs->addError(sprintf("The status is `%s`, but idUserLidia is not set.", $this->status)); } } } 