| 1 | <?php |
||
| 13 | class ShowMembershipAppConfirmationResponse { |
||
| 14 | |||
| 15 | private $membershipApplication; |
||
| 16 | private $updateToken; |
||
| 17 | |||
| 18 | public static function newNotAllowedResponse(): self { |
||
| 21 | |||
| 22 | public static function newValidResponse( MembershipApplication $membershipApplication, string $updateToken ): self { |
||
| 25 | |||
| 26 | private function __construct( MembershipApplication $membershipApplication = null, string $updateToken = null ) { |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Returns the MembershipApplication when @see accessIsPermitted returns true, or null otherwise. |
||
| 33 | * |
||
| 34 | * @return MembershipApplication|null |
||
| 35 | */ |
||
| 36 | public function getApplication() { |
||
| 39 | |||
| 40 | public function getUpdateToken() { |
||
| 43 | |||
| 44 | public function accessIsPermitted(): bool { |
||
| 47 | |||
| 48 | } |