2017 © Pedro Peláez
 

library quesos

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

image

makoru-hikage/quesos

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  • Monday, January 22, 2018
  • by makoru-hikage
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

QUESOS - Query String Organized Search

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings., (*1)

Please read the docs: the introduction and the usage, (*2)

Summary...

  1. Receive an HTTP GET request laden with query string.
https://www.yoursite.com/contacts/?sex=female&points=gt,9000&first_name=Aida,Lorna,Fe&age=bwn,21,35
  1. 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);

OUTPUT:, (*3)

Array
(
    [sex] => female
    [points] => gt,9000
    [first_name] => Aida,Lorna,Fe
    [age] => bwn,21,35
)
  1. Use the tool itself.
$test = new QueryStringConverter($parsedUrlQuery);

$finishedProduct = $test->convert();

print_r($finishedProduct, true);

OUTPUT:, (*4)

Array
(
    [sex] => Array
        (
            [0] => sex
            [1] => =
            [2] => female
        )

    [points] => Array
        (
            [0] => points
            [1] => >
            [2] => 9000
        )

    [first_name] => Array
        (
            [0] => first_name
            [1] => in
            [2] => Array
                (
                    [0] => Aida
                    [1] => Lorna
                    [2] => Fe
                )

        )

    [age] => Array
        (
            [0] => age
            [1] => between
            [2] => Array
                (
                    [0] => 21
                    [1] => 35
                )

        )

)
  1. Do whatever you want with that.

The Versions

22/01 2018

dev-master

9999999-dev

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Avatar makoru-hikage

06/10 2017

0.2.1

0.2.1.0

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

by Avatar makoru-hikage

27/09 2017

0.2.0

0.2.0.0

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Development Requires

by Avatar makoru-hikage

27/09 2017

0.1.1

0.1.1.0

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Development Requires

by Avatar makoru-hikage

27/09 2017

0.1.1-beta

0.1.1.0-beta

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Development Requires

by Avatar makoru-hikage

25/09 2017

0.1-beta

0.1.0.0-beta

Query String Organized Search: A format to facilitate CRUD search through the use of URL query strings.

  Sources   Download

MIT

The Development Requires

by Avatar makoru-hikage