private function extractProperties(DOMElement $propertiesNode, $ns = ''){

        $properties = array();
        $ns = $ns ? trim( $ns, ':' ) . ':' : '';

        foreach($propertiesNode->childNodes as $prop){

            if($prop instanceof DOMElement){
                switch($prop->tagName){
                    case $ns.'entry'://OAT PCI uses entry as property node
                    case $ns.'property'://IMS PCI uses entry as property node
                        $key = $prop->getAttribute('key');
                        $properties[$key] = $prop->nodeValue;
                        break;
                    case $ns.'properties':
                        $key = $prop->getAttribute('key');
                        $properties[$key] = $this->extractProperties($prop, $ns);
                        break;
                }
            }
        }

        return $properties;
    }
private function extractProperties(DOMElement $propertiesNode, $ns = ''){

        $properties = array();
        $ns = $ns ? trim( $ns, ':' ) . ':' : '';

        foreach($propertiesNode->childNodes as $prop){

            if($prop instanceof DOMElement){
                switch($prop->tagName){
                    case $ns.'entry'://OAT PCI uses entry as property node
                    case $ns.'property'://IMS PCI uses entry as property node
                        $key = $prop->getAttribute('key');
                        $properties[$key] = $prop->nodeValue;
                        break;
                    case $ns.'properties':
                        $key = $prop->getAttribute('key');
                        $properties[$key] = $this->extractProperties($prop, $ns);
                        break;
                }
            }
        }

        return $properties;
    }
private function extractProperties ( DOMElement $ propertiesNode , $ ns = '' ) { $ properties = array ( ) ; $ ns = $ ns ? trim ( $ ns , ':' ) . ':' : '' ; foreach ( $ propertiesNode -> childNodes as $ prop ) { if ( $ prop instanceof DOMElement ) { switch ( $ prop -> tagName ) { case $ ns . 'entry' : //OAT PCI uses entry as property node case $ ns . 'property' : //IMS PCI uses entry as property node $ key = $ prop -> getAttribute ( 'key' ) ; $ properties [ $ key ] = $ prop -> nodeValue ; break ; case $ ns . 'properties' : $ key = $ prop -> getAttribute ( 'key' ) ; $ properties [ $ key ] = $ this -> extractProperties ( $ prop , $ ns ) ; break ; } } } return $ properties ; }
Parse a pci properties dom node into an associative array

@param DOMElement $propertiesNode
@param string $ns
@return array
Parse a pci properties dom node into an associative array