$limitReport .= 'Dynamic content: ' .
( $this->mOutput->hasDynamicContent() ? 'true' : 'false' ) .
"\n";
+ $limitReport .= 'Complications: [' . implode( ', ', $this->mOutput->getAllFlags() ) . "]\n";
foreach ( $this->mOutput->getLimitReportData() as $key => $value ) {
if ( Hooks::run( 'ParserLimitReportFormat',
}
/**
- * Fairly generic flag setter thingy.
+ * Attach a flag to the output so that it can be checked later to handle special cases
+ *
* @param string $flag
*/
public function setFlag( $flag ) {
$this->mFlags[$flag] = true;
}
+ /**
+ * @param string $flag
+ * @return bool Whether the given flag was set to signify a special case
+ */
public function getFlag( $flag ) {
return isset( $this->mFlags[$flag] );
}
+ /**
+ * @return string[] List of flags signifying special cases
+ * @since 1.34
+ */
+ public function getAllFlags() {
+ return array_keys( $this->mFlags );
+ }
+
/**
* Set a property to be stored in the page_props database table.
*