StockManiac Helper Functionality
collection of public functions that do not fit anywhere else.
Located in /lib/helpers.class.php (line 37)
constructor
Get a fixed point of the same day out of the given timestamp.
By default it is noon (12:00:00). Optional it might be any other hour, day, year, ... suitable for use as callback.
Return timestamp for various 'human'ish time marks.
accepted timemarks are:
Convert a large number to a human readable abbreviation.
Ie. 1500 becomes 1.5 K, 25000000 becomes 25 M, etc ... the returned string will be formatted according to $locale. Its 'negative safe'. NOTE: this method is available in templates as modifier, ie. you can write {$var|human_readable_bignumber}
Convert $number to int in case the decimal part is 0, otherwise return as it is.
NOTE: this method is available in templates as modifier, ie. you can write {$var|human_readable_number}
Get a php.ini value and try to resolve 'shorthand strings' such as '5M' or '10G'.
I do wonder why there is no public function call for that, since PHP *is* doing this internally?
Verify whether val is close or equal to base given the max deviation.
Decode file upload error numbers as documented in the PHP Manual.
I wonder why this is not build into PHP?
Convert settings data as it is stored in the database into real array.
Single values (no '|') are kept as they are. The public function operates straight on the given value (=reference) which makes it useful as callback for array_walk_recursive())
Documentation generated on Sun, 22 Aug 2010 11:20:20 +0200 by phpDocumentor 1.4.3