| 1 | <?php  | 
            ||
| 8 | class Query  | 
            ||
| 9 | { | 
            ||
| 10 | private $unreserved_pattern = '\w\-\.~';  | 
            ||
| 11 |     private $pct_encoded_pattern = '%[A-Fa-f0-9]{2}'; | 
            ||
| 12 | private $sub_delims_pattern = '\!\$&\'\(\)\*\+,;\=';  | 
            ||
| 13 | private $pchar_pattern = '\:@';  | 
            ||
| 14 | |||
| 15 | private $valid_pattern;  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * Query constructor. Accepts a string representing a URI query. Construction will throw an exception if the  | 
            ||
| 19 | * query is either not a string or does not conform to the RFC3986 URI query specification.  | 
            ||
| 20 | *  | 
            ||
| 21 | * scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )  | 
            ||
| 22 | *  | 
            ||
| 23 | * @param $query  | 
            ||
| 24 | */  | 
            ||
| 25 | 10 | public function __construct($query)  | 
            |
| 35 | |||
| 36 | /**  | 
            ||
| 37 | * Compiles a regexp pattern based on predefined patterns that define allowed characters for a query. Note that the  | 
            ||
| 38 | * pipe indicates that a query can either contain all defined characters or contain percent encoded characters.  | 
            ||
| 39 | */  | 
            ||
| 40 | 10 | private function compileValidPattern()  | 
            |
| 50 | }  | 
            ||
| 51 |