. */ /** * Trida implementuje funkce pro manipulaci s query stringem * * @package Query * @author Tomas Mudrunka */ class Query { static function build($query=array(),$prefix=false) { $q=''; if(is_array($query)) foreach($query as $key => $val) { $key=urlencode($key); $pre = !$prefix ? $key : $prefix.'['.$key.']'; $q.=Query::build($val,$pre); } else { return $prefix.'='.urlencode($query).'&'; } return $q; } }