This is useful because you dont have to require the util.inc.php class everytime you want a function, it is automagically handled by autoload.
Definition at line 10 of file util.inc.php.
Static Public Member Functions | |
redirect ($url) | |
Redirects the user to the specified URL. | |
dump ($data) | |
dumps out information about a variable, nicely formatted. | |
setUrlParam ($url, $name, $value) | |
sets a parameter in a url. | |
isValidEmail ($email) | |
Checks is the provided email address is formally valid. | |
ieDrawClear () | |
draws a clearing div. | |
spawnHttpAsync ($page) | |
This function calls a script and then moves on. | |
getUrlContents ($link) | |
This function opens a url and gets its contents. | |
getBlurb ($text, $length=255, &$truncated=null) | |
This function gets a blurb of text from a larger chunk of text. | |
getNumberSuffix ($n) | |
This function adds a suffix (st, nd, rd, th) to a supplied number. | |
formatPhoneNumber ($number) | |
shellExec ($call) | |
noCache () | |
Prevents the current page from being cached in the client's browser. | |
pluralize ($str, $amount=null, $num=false) | |
Pluralizes the given string. |
|
dumps out information about a variable, nicely formatted.
Definition at line 28 of file util.inc.php. Referenced by BaseAdmin::drawViewCachePage(). |
|
Definition at line 234 of file util.inc.php. |
|
This function gets a blurb of text from a larger chunk of text. It also strips it of tags and calls nl2br to give it basic formatting.
Definition at line 173 of file util.inc.php. References Linkify::bbcode(). |
|
This function adds a suffix (st, nd, rd, th) to a supplied number.
Definition at line 213 of file util.inc.php. |
|
This function opens a url and gets its contents. It can be tricky to do this across hosts with different configs. cURL is pretty widely used, so thats how it is implemented.
Definition at line 147 of file util.inc.php. |
|
draws a clearing div. This is to fix float issues, and also for certain places where IE just barfs if there is no clearing div. Make sure you also declare this css data: div#clear { clear: both; height: 0; line-height: 0; } Definition at line 114 of file util.inc.php. Referenced by BaseModule::drawNavigation(), and BaseModule::drawSideBar(). |
|
Checks is the provided email address is formally valid.
Definition at line 93 of file util.inc.php. |
|
Prevents the current page from being cached in the client's browser.
Definition at line 253 of file util.inc.php. |
|
Pluralizes the given string.
If
Definition at line 283 of file util.inc.php. Referenced by BaseThread::drawCommentSummary(), Time::elapsed(), and BaseCalendar::getDateContent(). |
|
|
sets a parameter in a url. it will either add the parameter afterwards, eg foo.php?name=value, or if there are already parameters, it will add it in like this with a &: foo.php?old=val&name=value. Additionally, it will also replace the value if it finds it in the paramters in the url.
Definition at line 48 of file util.inc.php. Referenced by BaseModule::getUrl(). |
|
Definition at line 245 of file util.inc.php. Referenced by BaseImage::centerCrop(), Img::convert(), Img::crop(), Img::flip(), EasyFileCache::flush(), Img::resize(), Img::rotate(), and Img::scale(). |
|
This function calls a script and then moves on. The called script *must* call ignore_user_abort() otherwise it will die. This is used for things that may take a while... like resizing images. Currently it only supports async calling on the the current host.
Definition at line 127 of file util.inc.php. References Config::get(). Referenced by BaseImage::resizeUploadedFile(). |