Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
20 | 2 | public function __construct($username, $password) |
|
21 | { |
||
22 | 2 | $wsseNamespace = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; |
|
23 | 2 | $security = new SoapVar( |
|
24 | 2 | array(new SoapVar( |
|
25 | array( |
||
26 | 2 | new SoapVar($username, XSD_STRING, null, null, 'Username', $wsseNamespace), |
|
27 | 2 | new SoapVar($password, XSD_STRING, null, null, 'Password', $wsseNamespace) |
|
28 | 2 | ), |
|
29 | 2 | SOAP_ENC_OBJECT, |
|
30 | 2 | null, |
|
31 | 2 | null, |
|
32 | 2 | 'UsernameToken', |
|
33 | $wsseNamespace |
||
34 | 2 | )), |
|
35 | SOAP_ENC_OBJECT |
||
36 | 2 | ); |
|
37 | 2 | $this->SoapHeader($wsseNamespace, 'Security', $security, false); |
|
38 | } |
||
39 | } |