Useful Figaro Functions
Part of the power of Figaro is the library of lightweight but heavy hitting functions for real world applications built into the framework.
- debug() - this is the mother of all useful functions - it allows you to see what is actually going on with anything... just put a die(debug($Mysql->log)); in to see what your db is doing at any point in the code... die(debug($Mysql));to see how Figaro sees your database... Or die(debug($variable)); to see what a variable is doing... you can even comma seperate multiple variables.
- truncateStr() - useful for trimming long blog posts to fit into tight spaces. Takes the arguments str, word count, and elispsis (boolean)
- convertDate() - ever found yourself in a situation where you have to work with a MySQL timestamp instead of UNIX time? This function will return a human readable date from a timestamp. (June 12, 2007)