protected function parse_result($parent = false, $recursive = true)
{
$tmp = $this->result;
$tmp_res = array();
if (($c = $this->parse_conditions()) === false) {
return false;
}
foreach (array_keys($tmp) as $t) {
$this->root = $parent ? $tmp[$t]->parent : $tmp[$t];
$this->parse_callback($c, $recursive);
foreach (array_keys($this->result) as $r) {
if (!in_array($this->result[$r], $tmp_res, true)) {
$tmp_res[] = $this->result[$r];
}
}
}
$this->result = $tmp_res;
return true;
}