mirror of
https://github.com/danog/Valinor.git
synced 2024-12-15 10:27:02 +01:00
a97b406154
Will recursively flatten messages of a node and all its children. This helper can for instance be used when errors occurred during a mapping to flatten all caught errors into a basic array of string that can then easily be used to inform the user of what is wrong. ``` try { // … } catch(MappingError $error) { $messages = (new MessagesFlattener($error->node()))->errors(); foreach ($messages as $message) { echo $message; } } ``` |
||
---|---|---|
.. | ||
Formatter | ||
MessagesFlattenerTest.php | ||
NodeMessageTest.php | ||
ThrowableMessageTest.php |