-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Proposal: Serialize and Unserialize of a QR-string #36
Comments
No problem. I am glad the library is helpful for you and feedback is always welcome.
What already works is to get the actual contents of the qr code image with I'd suggest an integration like this: // Serialize
$existingQrBillString = $qrBill->getQrString(); // internally doing $qrBill->getQrCode()->getText();
// Deserialize
$newQrBill = QrBill::createFromQrString($existingQrBillString); // this needs to be built Would this cover your use case or did you have something else in mind? |
Yes, this covers exactly my idea here. The shortcut From your comment I didn't understand if you suggest how I should implement it, or if you plan to add the feature yourself. As said, i can try to work on it, but i can't estimate when it would be ready, as i neither know how long it will take nor how much time i can spend on it within the next weeks. |
I cannot tell whether I will have time for this in the next few weeks. So I suggest, we leave it pending here and if anybody wants to start working on it, they hopefully will let us know :) |
My apologies for a lot of noise from me the last few days. We just started working on the QR-Bill implementation.
I am currently writing our specification of the feature, and came to the conclusion, that it could make sense to store and restore the QR-Code content instead of creating it from data every time.
Since PHP 7.4 we could wrap it in
__serialize
and__unserialize
, but I think that's not what it's intentional use is (for me php-serialize is more technical, while this seems Domain Knowledge).Therefore, I think
getContentString()
andparseContentString($string)
could make more sense.I would be happy to work out a PR to add this on occasion. But maybe there's already a similar feature implemented I'm missing here? Or are there some specific reason that it's not supported in the first place?
The text was updated successfully, but these errors were encountered: