[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Various helper functions
File Size: | 69 lines (2 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
substr_replace(str, replace, start, length) X-Ref |
A PHP-style substr_replace Supports negative start and length and omitting length, but not str and replace arrays. See http://php.net/substr-replace for further documentation. |
bind(fnc) X-Ref |
Bind variables to a function call creating a closure Use this to circumvent variable scope problems when creating closures inside a loop returns: functionref param: functionref fnc - the function to be called param: mixed - any arguments to be passed to the function author: Adrian Lang <lang@cosmocode.de> link: http://www.cosmocode.de/en/blog/gohr/2009-10/15-javascript-fixing-the-closure-scope-in-loops |
logError(e, file) X-Ref |
Report an error from a JS file to the console param: e The error object param: file The file in which the error occurred |