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