PHP code example of nerd4ever / url-query
1. Go to this page and download the library: Download nerd4ever/url-query library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nerd4ever / url-query example snippets
use Nerd4ever\UrlQuery\Model\UrlQuery;
$urlQuery = new UrlQuery();
$urlQuery->parser($_SERVER['QUERY_STRING']);
Nerd4ever\UrlQuery\Model\UrlQuery::__set_state(array(
'reservedSortField' => '_orders',
'filters' =>
array (
0 =>
Nerd4ever\UrlQuery\Model\CriteriaEquals::__set_state(array(
'value' => '3',
'field' => 'data0',
)),
1 =>
Nerd4ever\UrlQuery\Model\CriteriaGreaterThanOrEquals::__set_state(array(
'value' => '3',
'field' => 'data1',
)),
2 =>
Nerd4ever\UrlQuery\Model\CriteriaLessThanOrEquals::__set_state(array(
'value' => '3',
'field' => 'data2',
)),
3 =>
Nerd4ever\UrlQuery\Model\CriteriaNotEquals::__set_state(array(
'field' => 'data3',
'value' => '3',
)),
4 =>
Nerd4ever\UrlQuery\Model\CriteriaEquals::__set_state(array(
'value' => '3',
'field' => 'data4',
)),
5 =>
Nerd4ever\UrlQuery\Model\CriteriaGreaterThan::__set_state(array(
'value' => '3',
'field' => 'data5',
)),
6 =>
Nerd4ever\UrlQuery\Model\CriteriaLessThan::__set_state(array(
'value' => '3',
'field' => 'data6',
)),
7 =>
Nerd4ever\UrlQuery\Model\CriteriaRegex::__set_state(array(
'value' => '[0-9]',
'field' => 'data7',
)),
8 =>
Nerd4ever\UrlQuery\Model\CriteriaIn::__set_state(array(
'values' =>
array (
0 => '3',
1 => '4',
2 => '5',
),
'field' => 'data8',
)),
9 =>
Nerd4ever\UrlQuery\Model\CriteriaBetween::__set_state(array(
'start' => '3',
'end' => '5',
'field' => 'data9',
)),
10 =>
Nerd4ever\UrlQuery\Model\CriteriaContains::__set_state(array(
'value' => '3',
'field' => 'data10',
)),
11 =>
Nerd4ever\UrlQuery\Model\CriteriaStart::__set_state(array(
'value' => '3',
'field' => 'data11',
)),
12 =>
Nerd4ever\UrlQuery\Model\CriteriaFinish::__set_state(array(
'value' => '5',
'field' => 'data12',
)),
13 =>
Nerd4ever\UrlQuery\Model\CriteriaNil::__set_state(array(
'field' => 'data13',
)),
),
'sorters' =>
array (
0 =>
Nerd4ever\UrlQuery\Model\Sorter::__set_state(array(
'type' => 'asc',
'field' => 'data1',
)),
1 =>
Nerd4ever\UrlQuery\Model\Sorter::__set_state(array(
'type' => 'desc',
'field' => 'data2',
)),
2 =>
Nerd4ever\UrlQuery\Model\Sorter::__set_state(array(
'type' => 'asc',
'field' => 'data3',
)),
),
));