private function _parse_output($value = NULL, $match = NULL, $filter = NULL, $default = NULL)
{
// parse tags?
if (($this->parse_tags || $this->parse_vars || $this->parse_conditionals) && !$this->parse_complete) {
// do parsing
$this->EE->TMPL->tagdata = $value;
$this->_parse_sub_template($this->parse_tags, $this->parse_vars, $this->parse_conditionals, $this->parse_depth);
$value = $this->EE->TMPL->tagdata;
unset($this->EE->TMPL->tagdata);
}
// regex match
if ($match !== NULL && $value !== NULL) {
$is_match = $this->_matches($match, $value);
if (!$is_match) {
$value = $default;
}
}
// regex filter
if ($filter !== NULL && $value !== NULL) {
preg_match($filter, $value, $found);
if (isset($found[1])) {
$value = $found[1];
}
}
// apply string manipulations
$value = $this->_clean_string($value);
return $value;
}