-
Notifications
You must be signed in to change notification settings - Fork 0
/
APIAuthenticationType.php
62 lines (60 loc) · 1.41 KB
/
APIAuthenticationType.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace PayPal\EnumType;
/**
* This class stands for APIAuthenticationType EnumType
* Meta information extracted from the WSDL
* - documentation: API Authentication Type
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class APIAuthenticationType
{
/**
* Constant for value 'Auth-None'
* @return string 'Auth-None'
*/
const VALUE_AUTH_NONE = 'Auth-None';
/**
* Constant for value 'Cert'
* @return string 'Cert'
*/
const VALUE_CERT = 'Cert';
/**
* Constant for value 'Sign'
* @return string 'Sign'
*/
const VALUE_SIGN = 'Sign';
/**
* Return true if value is allowed
* @uses self::getValidValues()
* @param mixed $value value
* @return bool true|false
*/
public static function valueIsValid($value)
{
return ($value === null) || in_array($value, self::getValidValues(), true);
}
/**
* Return allowed values
* @uses self::VALUE_AUTH_NONE
* @uses self::VALUE_CERT
* @uses self::VALUE_SIGN
* @return string[]
*/
public static function getValidValues()
{
return array(
self::VALUE_AUTH_NONE,
self::VALUE_CERT,
self::VALUE_SIGN,
);
}
/**
* Method returning the class name
* @return string __CLASS__
*/
public function __toString()
{
return __CLASS__;
}
}