File indexing completed on 2024-12-22 05:36:24

0001 <?php
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 
0023 /**
0024  * Class Local_Verification_Queue_Command
0025  * @deprecated 
0026  */
0027 class Local_Verification_Queue_Command implements Local_Queue_CommandInterface
0028 {
0029 
0030     private $memberId;
0031     private $websiteUrl;
0032     private $authCode;
0033 
0034     function __construct($memberId, $websiteUrl, $authCode)
0035     {
0036         if (empty($memberId)) {
0037             throw new Exception('The memberId is necessary');
0038         }
0039         $this->memberId = $memberId;
0040         $this->websiteUrl = $websiteUrl;
0041         $this->authCode = $authCode;
0042     }
0043 
0044     public function doCommand()
0045     {
0046         $websiteOwner = new Local_Verification_WebsiteOwner();
0047         $verificationResult = $websiteOwner->validateAuthCode($this->websiteUrl, $this->memberId);
0048         $websiteOwner->updateData($this->memberId, $verificationResult);
0049     }
0050 
0051     public function getWebsiteUrl()
0052     {
0053         return $this->websiteUrl;
0054     }
0055 
0056     public function setWebsiteUrl($websiteUrl)
0057     {
0058         $this->websiteUrl = $websiteUrl;
0059     }
0060 
0061     public function getMemberId()
0062     {
0063         return $this->memberId;
0064     }
0065 
0066     public function setMemberId($memberId)
0067     {
0068         $this->memberId = $memberId;
0069     }
0070 
0071     public function getAuthCode()
0072     {
0073         return $this->authCode;
0074     }
0075 
0076     public function setAuthCode($authCode)
0077     {
0078         $this->authCode = $authCode;
0079     }
0080 
0081 }