Miscellaneous utility functions used by Sugar.
Provides several utility functions used by the Sugar codebase.
PHP version 5
LICENSE:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Performs string-escaping for JavaScript values.
This is the equivalent of running addslashes() and then replacing control characters with their escaped equivalents.
Returns an argument from a function parameter list, supporting both position and named parameters and default values.
Checks if an array is a "vector," or an array with only integral indexes starting at zero and incrementally increasing. Used only for nice exporting to JavaScript.
Only really used for Sugar_Util_Json.
Formats a PHP value in JavaScript format.
We can probably juse use json_encode() instead of this, except json_encode() is PHP 5.2 only.
Attempt to locate a file in one or more source directories.
Convert a value into a timestamp. This is essentially strtotime(), except that if an integer timestamp is passed in it is returned verbatim, and if the value cannot be parsed, it returns the current timestamp.
Documentation generated on Sat, 18 Sep 2010 05:27:03 +0000 by phpDocumentor 1.4.3