function beginBlock($condition) { if ($condition != $this->blockLast) { $this->blockLoc[$condition]++; } $this->blockLast = $condition; return parent::begin($condition); }
/** * Where a parse generally starts. Can be self-called, as this is detected, and if nested, a new parser is instantiated * * @access private * @param string $input Wiki syntax to be parsed * @return string $output Parsed wiki syntax */ function parse($input) { if (empty($input)) { return $input; } if ($this->parsing == true) { $class = get_class($this->Parser); $parser = new $class($this->Parser); $output = $parser->parse($input); unset($parser); } else { $this->parsing = true; $this->preParse($input); $this->Parser->parseDepth++; $output = parent::parse($input); $this->Parser->parseDepth--; $this->parsing = false; $this->postParse($output); } return $output; }