Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved comments.

  • Loading branch information...
commit cf89c5784490271e347fdc379edd760b89391c1f 1 parent 666999f
Chris Pliakas authored
5 library/Nagiostatus/Parser.php
@@ -141,11 +141,14 @@ public function buildDocument(Nagiostatus_Plugin_Abstract $plugin)
141 141 *
142 142 * @param string $pluginName
143 143 * The name of the plugin used to render the data, i.e. "xml" or "json".
  144 + * Defaults to null meaning the default plugin is used.
144 145 * @param bool $return
145 146 * Return the variable representation instead of outputing it.
146 147 *
147 148 * @return string|bool
148   - * The rendered status data, false if there are errors.
  149 + * Returns false on errors. If $return is false, this method returns true
  150 + * on success. If $return is true, this method returns the parsed document
  151 + * as a string in the machine readable format determined by the plugin.
149 152 */
150 153 public function render($pluginName = null, $return = false)
151 154 {
16 library/Nagiostatus/Plugin/Abstract.php
@@ -16,24 +16,26 @@
16 16 /**
17 17 * Base class for Nagiostatus plugins.
18 18 *
  19 + * Plugins render the status.dat file in machine readable formats and output the
  20 + * data directly to STDOUT as opposed to building the document in memory.
  21 + *
19 22 * @package Nagiostatus
20 23 * @subpackage Plugin
21 24 */
22 25 abstract class Nagiostatus_Plugin_Abstract
23 26 {
24   -
25 27 /**
26   - * The Nagiostatus_Parser instance containing the parsed data.
  28 + * The calling Nagiostatus_Parser instance.
27 29 *
28 30 * @var Nagiostatus
29 31 */
30 32 protected $_parser;
31 33
32 34 /**
33   - * Sets the Nagiostatus_Parser instance containing the parsed data.
  35 + * Sets the calling Nagiostatus_Parser instance.
34 36 *
35 37 * @param Nagiostatus_Parser $status
36   - * The Nagiostatus_Parser instance containing the parsed data.
  38 + * The calling Nagiostatus_Parser instance.
37 39 */
38 40 public function __construct(Nagiostatus_Parser $parser)
39 41 {
@@ -41,10 +43,10 @@ public function __construct(Nagiostatus_Parser $parser)
41 43 }
42 44
43 45 /**
44   - * Returns the Nagiostatus_Parser instance containing the parsed data
  46 + * Returns the calling Nagiostatus_Parser instance.
45 47 *
46 48 * @return Nagiostatus_Parser
47   - * The Nagiostatus_Parser instance containing the parsed data
  49 + * The calling Nagiostatus_Parser instance.
48 50 */
49 51 public function getParser()
50 52 {
@@ -63,7 +65,7 @@ public function initDocument()
63 65 * Outputs the status data in machine readable format.
64 66 *
65 67 * @param array $status
66   - * The parsed status information.
  68 + * An individual status information block parsed as an associative array.
67 69 */
68 70 abstract public function execute(array $status);
69 71
2  library/Nagiostatus/Plugin/Json.php
@@ -22,7 +22,7 @@
22 22 class Nagiostatus_Plugin_Json extends Nagiostatus_Plugin_Abstract
23 23 {
24 24 /**
25   - * Whether the
  25 + * Flags whether we are parsing the first status block.
26 26 *
27 27 * @var boolean
28 28 */

0 comments on commit cf89c57

Please sign in to comment.
Something went wrong with that request. Please try again.