Skip to content

Commit

Permalink
added documentation for html_only
Browse files Browse the repository at this point in the history
* Added a doc comment for html_only option.
* Now turn the given value for html_only to a boolean
* Formatted html_only to match other options
* added missing private field declarations for htmlOnly and
displayLineNumbers.
  • Loading branch information
joseph lenton committed Jul 26, 2012
1 parent 9fc7830 commit 2163b1f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/php_error.php
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,9 @@ public static function identifyTypeHTML( $arg, $recurseLevels=1 ) {
private $backgroundText;
private $numLines;

private $displayLineNumber;
private $htmlOnly;

private $bufferOutput;
private $isInEndBuffer;

Expand Down Expand Up @@ -1161,6 +1164,11 @@ public static function identifyTypeHTML( $arg, $recurseLevels=1 ) {
* - background_text The text that appeares in the background. By default this is blank.
* Why? You can replace this with the name of your framework, for extra customization spice.
*
* - html_only By default, PHP Error only runs on ajax and HTML pages.
* If this is false, then it will also run when on non-HTML
* pages too, such as replying with images of JavaScript
* from your PHP. Defaults to true.
*
* @param options Optional, an array of values to customize this handler.
* @throws Exception This is raised if given an options that does *not* exist (so you know that option is meaningless).
*/
Expand Down Expand Up @@ -1220,7 +1228,7 @@ public function __construct( $options=null ) {
$this->numLines = ErrorHandler::optionsPop( $options, 'snippet_num_lines' , ErrorHandler::NUM_FILE_LINES );
$this->displayLineNumber = ErrorHandler::optionsPop( $options, 'display_line_numbers' , false );

$this->htmlOnly = ErrorHandler::optionsPop( $options, 'html_only', true );
$this->htmlOnly = !! ErrorHandler::optionsPop( $options, 'html_only', true );

$this->classNotFoundException = null;

Expand Down

0 comments on commit 2163b1f

Please sign in to comment.