3 * Container for all kind of Warnings the parser/analyser recognizes
\r
5 * The base of the report generator module is this container. It's currently
\r
6 * pretty simple and will change later on...
\r
8 * @version $Id: PhpdocWarning.php,v 1.2 2000/12/03 22:37:38 uw Exp $
\r
10 class PhpdocWarning extends PhpdocObject {
\r
13 * Hash of documentation failures.
\r
16 var $doc_warnings = array();
\r
19 * Counter containing the number of documentation warnings.
\r
21 * @see getNumDocWarnings(), getNumWarnings()
\r
23 var $num_doc_warnings = 0;
\r
26 * Adds a warning to the list of class documentation failures.
\r
27 * @param string Name of the file that containts the error
\r
28 * @param string Kind of the element that caused the error: module, class, function, variable, use, const
\r
29 * @param string Name of the class/function/... that caused the warning
\r
30 * @param string Warning message itself
\r
31 * @param string Type of the error: missing, mismatch, syntax, ...
\r
33 * @see addDocWarning()
\r
35 function addDocWarning($file, $elementtype, $elementname, $warning, $type="missing") {
\r
37 $this->doc_warnings[$file][$elementtype][] = array(
\r
38 "name" => $elementname,
\r
42 $this->num_doc_warnings++;
\r
44 } // end func addDocWarning
\r
47 * Returns a list of warnings.
\r
49 * @return array $warnings
\r
52 function getWarnings() {
\r
53 return $this->doc_warnings;
\r
54 } // end func getParserWarnings
\r
57 * Returns the total number of documentation warnings.
\r
59 * @see getNumParserWarnings(), getNumWarnings()
\r
61 function getNumDocWarnings() {
\r
62 return $this->num_doc_warnings;
\r
63 } // end func getNumDocWarnings
\r
65 } // end class PhpdocWarning
\r