[PEPr] Comment on XML::EncryptedDomDocument

From: Date: Tue, 12 Dec 2006 10:22:08 +0000
Subject: [PEPr] Comment on XML::EncryptedDomDocument
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45170@lists.php.net to get a copy of this message
Lukas Feiler (http://pear.php.net/user/lukasfeiler) has commented on the proposal for XML::EncryptedDomDocument. Comment: First of all: great idea for a package! some minor coding issues (see the pear manual for details): - lines shouldn't be longer than 75-85 characters - function & class definitions should follow the "BSD/Allman style" - constant names should be all uppercase - all if statements should have curly braces - exceptions: create your own exception class by extending Exception and throw that instead of an instance of Exception. Please also provide a phps link to the package source (for the lazy ones like myself). regarding the package's name & design: I'm not sure that extending DomDocument is the right way to go. IMHO it should be possible to encrypt/decrypt nodes of an existing DomDocument instance without converting the DomDocument instance to an instance of XML_EncryptedDomDocument. Your class shouldn't be static though. One might want to register different keys with different instances of the class. Given that the package might also provide digital signature support one day, I suggest to name the package/class XML_Crypt. Also: there should not only be a method for replacing a node with an encrypted version of it but also a method that only returns that encrypted version. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=462 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#45170) next »