-
Notifications
You must be signed in to change notification settings - Fork 32
/
Request.php
36 lines (28 loc) · 858 Bytes
/
Request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace baibaratsky\WebMoney\Api\MegaStock;
use baibaratsky\WebMoney\Exception\ApiException;
use baibaratsky\WebMoney\Request\XmlRequest;
abstract class Request extends XmlRequest
{
const LOGIN_TYPE_KEEPER = 1;
const LOGIN_TYPE_PROCESSING = 2;
/** @var int login/@type */
protected $loginType;
/** @var string */
protected $salt;
public function __construct($loginType = self::LOGIN_TYPE_PROCESSING, $salt = null)
{
if ($loginType !== self::LOGIN_TYPE_KEEPER && $loginType !== self::LOGIN_TYPE_PROCESSING) {
throw new ApiException('This interface doesn\'t support the login type given.');
}
$this->loginType = $loginType;
$this->salt = $salt;
}
/**
* @return int
*/
public function getLoginType()
{
return $this->loginType;
}
}