AbcAeffchen / Sephpa

PHP class to create SEPA xml files for credit transfer and direct debit
GNU Lesser General Public License v3.0
71 stars 31 forks source link

Give the php acces to generate Xml #21

Closed jmbIFR closed 4 years ago

jmbIFR commented 5 years ago

Make the generateXml() function public allow a direct access to php to the generated xml wihtout using the store or download function

https://github.com/AbcAeffchen/Sephpa/commit/5e3433e8cd210417060b66aee70a9ae8ba6f4802

AbcAeffchen commented 5 years ago

I'm not sure why Sephpa should support this. The only reason I can think about is that one uses Sephpa in some kind of commandline tool that should outputs the XML string to stdout which is piped into a file or something like that. But this seems not a very likely case.

Do you have an other reason for that?

AbcAeffchen commented 4 years ago

The function Sephpa::generateOutput returns an array of pairs of filename and a string representing the content of the file. For all xml files this is just xml code. So if one really needs to do something with this just parse the string. But it seems to invalidate the whole validation process that Sephpa does if one changes the file after it was created. So I will not provide a xml object out of the box.