protected function _walk(&$node, &$more, &$path, &$obj, $method)
{
if ($node['type'] == Whups_Query::TYPE_CRITERION) {
$obj->{$method}($more, $path, Whups_Query::TYPE_CRITERION, $node['criterion'], $node['cvalue'], $node['operator'], $node['value']);
} else {
$obj->{$method}($more, $path, $node['type'], null, null, null, null);
}
if (isset($node['children'])) {
$count = count($node['children']);
for ($i = 0; $i < $count; $i++) {
$path[] = $i;
$more[] = $i < $count - 1;
$this->_walk($node['children'][$i], $more, $path, $obj, $method);
array_pop($more);
array_pop($path);
}
}
}