asXML(); } else if (is_string($xmlData)) { $strXmlData = $xmlData; } else { throw new Zend_InfoCard_Xml_Exception("Invalid Data provided to create instance"); } $sxe = simplexml_load_string($strXmlData); $namespaces = $sxe->getDocNameSpaces(); if(!empty($namespaces)) { foreach($sxe->getDocNameSpaces() as $namespace) { switch($namespace) { case 'http://www.w3.org/2000/09/xmldsig#': include_once 'Zend/InfoCard/Xml/KeyInfo/XmlDSig.php'; return simplexml_load_string($strXmlData, 'Zend_InfoCard_Xml_KeyInfo_XmlDSig'); default: throw new Zend_InfoCard_Xml_Exception("Unknown KeyInfo Namespace provided"); // We are ignoring these lines, as XDebug reports each as a "non executed" line // which breaks my coverage % // @codeCoverageIgnoreStart } } } // @codeCoverageIgnoreEnd include_once 'Zend/InfoCard/Xml/KeyInfo/Default.php'; return simplexml_load_string($strXmlData, 'Zend_InfoCard_Xml_KeyInfo_Default'); } }