Matthimatiker / MolComponents

Library with use-at-will architecture that extends the functionality of Zend Framework 1. Main features: Improved bootstrapping with lazy loading of resources, declaration of request parameters as argument in controller actions, advanced form creation and validation, mail templates, lightweight controller testing.
Other
2 stars 0 forks source link

Create helper class that converts values into readable strings #36

Closed Matthimatiker closed 11 years ago

Matthimatiker commented 11 years ago

Create a utility class (Stringifier) that is able to convert any value into a readable string.

This should for example be useful if an unexpected argument type is received by a method and the received type/value shall be added to an exception message.

Requirements:

Matthimatiker commented 11 years ago

The helper class should also be able to deal with closures (at least it should not break).

Matthimatiker commented 11 years ago

Added class Mol_Util_Stringifier that provides the methods stringify() and stringifyException().

Currently, stringify() is mostly used to create representations of invalid arguments. These representations are added to exception messages.