Recommend this page to a friend! |
Classes of Kjell-Inge Gustafsson | PHP XML Signature | README.md | Download |
|
DownloadDsigSdk
and provide
For help finding a good PHP cryptography library, please review * Choosing the Right Cryptography Library for your PHP Project: A Guide Usage, parse XMLTo parse an Dsig (Signature root) XML file (using XMLReader) :
The XML parser save the XMLreader node properties (baseURI, localName, name, namespaceURI, prefix) for each XML (Dto) element as 'XMLattributes' as well as XML attributes (xmlns, xmlns:*, schemaLocation), if set (more info below). 'any' [XSD] elements are accepted as 'Anytype' object instances (more info below, 'AnyType'). Usage, build up structureTo build up dsig structure:
XML attributesYou can set (single 'element') XMLattribute using
To set (ex. prefix) and 'propagate' down in hierarchy:
You can remove (single 'element') XMLattribute using
To unset (ex. prefix) and 'propagate' down in hierarchy:
To fetch and iterate over XMLAttributes
AnytypeAnytype object instances are used for 'any' [XSD] elements. The element name are stored and fetched with
The 'any' [XSD] element attributes may include XML attributes. The AnyType attributes are stored and fetched as array.
Note, an AnyType instance may have * content * type string, * AnyType::setContent() * AnyType::getContent() or * sub-elements type array [AnyType] * AnyType::setSubElements() * AnyType::getSubElements() but not both. Usage, output as XMLDsigSdk uses XMLWriter creating output.
The XMLwriter adds for each element * element name with prefix, if exists XMLattribute xmlns, xmlns: and schemaLocation, if exists. Usage, output as DomNode
InfoFor class structure and architecture, please review * the [XSD] * docs/Dsig.png class design * the src/DsigLoader directory You may find convenient constants in - src/DsigInterface - src/XMLAttributesInterface For base64Encode/base64Decode/hash support, please review src/Impl/Impl.md Installation[Composer]From the Command Line:
In your
Acquire access
Run tests
OrDownload and acquire..
SupportFor support, please use [Github]/issues. LicenseThis project is licensed under the LGPLv3 License [Composer]:https://getcomposer.org/ [Github]:https://github.com/iCalcreator/dsigsdk/issues [http://www.w3.org/2000/09/xmldsig#]:http://www.w3.org/2000/09/xmldsig# [XSD]:https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd |