Skip to content
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

[ZF3] FlashMessenger: sort by datetime / multiple tagging #6

Open
weierophinney opened this issue Dec 31, 2019 · 1 comment
Open

[ZF3] FlashMessenger: sort by datetime / multiple tagging #6

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7161
User: @ThaDafinser
Created On: 2015-01-27T11:53:21Z
Updated At: 2015-04-22T08:56:44Z
Body
Since the flashMessenger uses namespaces to group the messages, its impossible to sort the messages just by date.

I suggest to remove that limitation. Instead of grouping it in different arrays, maybe it would be better to store them in a single array.

To achieve the different types, maybe we could do that over "tagging". This could also enable mutliple tagging/routing to the right place...


Comment

User: @manuakasam
Created On: 2015-03-27T17:13:21Z
Updated At: 2015-03-27T17:13:21Z
Body
I'm against removing the namespaces because it eases grouping messages a lot. There's been many cases where I've used Namespaces on FlashMessages and found the feature incredibly useful.

However it shouldn't be this difficult to rewrite to have it ordered by date (per namespace though!)

Right now the code is:

$container->{$namespace}->push($message);

All the change required would be

$time = microtime(true) * 1000;
$container->{$namespace}->offsetSet($time, $message);

This however would dare a risk of overwriting messages (though quite low).

I'd rather see an additional FlashMessenger implementation like TimedFlashMessenger that simply does things a bit different. Thoughts?


Comment

User: @RalfEggert
Created On: 2015-04-22T08:56:44Z
Updated At: 2015-04-22T08:56:44Z
Body
Should be marked for ZF3 milestone, shouldn't it?



Originally posted by @GeeH at zendframework/zend-mvc#178

@samsonasik samsonasik transferred this issue from laminas/laminas-mvc Jul 16, 2020
@samsonasik
Copy link
Member

I transfered the issue. Currently in laminas-mvc-plugin-flashmessenger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants