mirror of
https://github.com/danog/Valinor.git
synced 2024-12-15 02:16:59 +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; } } ``` |
||
---|---|---|
.. | ||
Builder | ||
Message | ||
Visitor | ||
NodeTest.php | ||
NodeTraverserTest.php | ||
ShellTest.php |