RobRichards\WsePhp\WSSESoapServer::locateSecurityHeader PHP Method

locateSecurityHeader() private method

private locateSecurityHeader ( $setActor = null )
    private function locateSecurityHeader($setActor = null)
    {
        $wsNamespace = null;
        if ($this->secNode == null) {
            $headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header');
            if ($header = $headers->item(0)) {
                $secnodes = $this->SOAPXPath->query('./*[local-name()="Security"]', $header);
                $secnode = null;
                foreach ($secnodes as $node) {
                    $nsURI = $node->namespaceURI;
                    if ($nsURI == self::WSSENS || $nsURI == self::WSSENS_2003) {
                        $actor = $node->getAttributeNS($this->soapNS, 'actor');
                        if (empty($actor) || $actor == $setActor) {
                            $secnode = $node;
                            $wsNamespace = $nsURI;
                            break;
                        }
                    }
                }
            }
            $this->secNode = $secnode;
        }
        return $wsNamespace;
    }