ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCtrlQueryRegexParser Class Reference
+ Inheritance diagram for ilCtrlQueryRegexParser:
+ Collaboration diagram for ilCtrlQueryRegexParser:

Public Member Functions

 parseQueriesOfURL (string $query_string)
 Must return an associative array of key => value pairs from the given query string. More...
 

Private Attributes

const PATTERN = '/([^=&]*)=([^=&]*)/m'
 

Detailed Description

Member Function Documentation

◆ parseQueriesOfURL()

ilCtrlQueryRegexParser::parseQueriesOfURL ( string  $query_string)

Must return an associative array of key => value pairs from the given query string.

Parameters
string$query_string
Returns
array<string, string>

Implements ilCtrlQueryParserInterface.

Definition at line 28 of file class.ilCtrlQueryRegexParser.php.

28  : array
29  {
30  preg_match_all(self::PATTERN, $query_string, $matches, PREG_SET_ORDER, 0);
31  $query_parameters = [];
32  foreach ($matches as $match) {
33  $query_parameters[$match[1]] = $match[2];
34  }
35 
36  return $query_parameters;
37  }

Field Documentation

◆ PATTERN

const ilCtrlQueryRegexParser::PATTERN = '/([^=&]*)=([^=&]*)/m'
private

Definition at line 26 of file class.ilCtrlQueryRegexParser.php.


The documentation for this class was generated from the following file: