Class with miscellaneous static methods.
This class will contain various methods that govern the overall behavior of PEL.
Debugging output from PEL can be turned on and off by assigning true or false to Pel::$debug.
Located in /src/Pel.php (line 85)
Clear list of stored exceptions.
Use this function before a call to some method if you intend to check for exceptions afterwards.
Conditionally output debug information.
This method works just like printf() except that it always terminates the output with a newline, and that it only outputs something if the Pel::$debug is true.
Translate and format a string.
This static function will first use Gettext to translate a format string, which will then have access to any extra arguments. By always using this function for dynamic string one is assured that the translation will be taken from the correct text domain. If the string is static, use tra instead as it will be faster.
Return list of stored exceptions.
When PEL is parsing in non-strict mode, it will store most exceptions instead of throwing them. Use this method to get hold of them when a call returns.
Code for using this could look like this:
This gives applications total control over the amount of error messages shown and (hopefully) provides the necessary information for proper error recovery.
Conditionally throw an exception.
This method will throw the passed exception when strict parsing in effect (see setStrictParsing()). Otherwise the exception is stored (it can be accessed with getExceptions()) and a warning is issued (with Pel::warning).
Translate a string.
This static function will use Gettext to translate a string. By always using this function for static string one is assured that the translation will be taken from the correct text domain. Dynamic strings should be passed to fmt instead.
Conditionally output a warning.
This method works just like printf() except that it prepends the output with the string 'Warning: ', terminates the output with a newline, and that it only outputs something if the PEL_DEBUG defined to some true value.
Enable/disable debugging output.
Set the JPEG encoding quality.
Enable/disable strict parsing.
If strict parsing is enabled, then most errors while loading images will result in exceptions being thrown. Otherwise a warning will be emitted (using Pel::warning) and the exceptions will be stored for later use via getExceptions().
Some errors will still be fatal and result in thrown exceptions, but an effort will be made to skip over as much garbage as possible.
Documentation generated on Thu, 05 May 2011 07:18:55 +0200 by phpDocumentor 1.4.3