QUESOS - Query String Organized Search
Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.
- Receive an HTTP GET request laden with query string.
- Let it be parsed anyway you like, either by vanilla PHP or any framework.
$rawQueryStr = $_SERVER['QUERY_STRING']; $parsedUrlQuery = array(); parse_str($rawQueryStr, $parsedUrlQuery); print_r($parsedUrlQuery, true);
Array ( [sex] => female [points] => gt,9000 [first_name] => Aida,Lorna,Fe [age] => bwn,21,35 )
- Use the tool itself.
$test = new QueryStringConverter($parsedUrlQuery); $finishedProduct = $test->convert(); print_r($finishedProduct, true);
Array ( [sex] => Array (  => sex  => =  => female ) [points] => Array (  => points  => >  => 9000 ) [first_name] => Array (  => first_name  => in  => Array (  => Aida  => Lorna  => Fe ) ) [age] => Array (  => age  => between  => Array (  => 21  => 35 ) ) )
- Do whatever you want with that.