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

Please, add getMessages($type = null) method #6

Open
seyfer opened this issue Mar 14, 2017 · 1 comment
Open

Please, add getMessages($type = null) method #6

seyfer opened this issue Mar 14, 2017 · 1 comment

Comments

@seyfer
Copy link

seyfer commented Mar 14, 2017

Sometimes instead of doing just display() dev need to get messages array.

foreach( $_SESSION['flash_messages'][$type] as $msgData ) {

From display() code I realized that $msgData should be returned or all flash_messages container depending on provided parameter $type.

@seyfer
Copy link
Author

seyfer commented Mar 14, 2017

Typical use-case

$msg = new FlashMessages();

Debug::dump($msg->getMessages());

Debug::dump($msg->getMessages(FlashMessages::INFO));

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

1 participant