Ejemplo n.º 1
0
 /**
  * Format a [rule] tag.
  *
  * This substitutes the content provided by the BBCode object, whatever that may be.
  *
  * @param BBCode $bbcode The {@link BBCode} object doing the parsing.
  * @param int $action The current action being performed on the tag.
  * @param string $name The name of the tag.
  * @param string $default The default value passed to the tag in the form: `[tag=default]`.
  * @param array $params All of the parameters passed to the tag.
  * @param string $content The content of the tag. Only available when {@link $action} is **BBCODE_OUTPUT**.
  * @return bool|string Returns the rule HTML or **true** if {@link $action} is **BBCode::BBCODE_CHECK**.
  */
 public function doRule(BBCode $bbcode, $action, $name, $default, $params, $content)
 {
     if ($action == BBCode::BBCODE_CHECK) {
         return true;
     } else {
         return $bbcode->getRuleHTML();
     }
 }