+ // Get the "request data" from the command-line argument list
+ $args = $_SERVER['argv'];
+
+ // Are there less than two parameters?
+ if ($_SERVER['argc'] < 2) {
+ // Skip this
+ return;
+ } // END - if
+
+ // Is the first element "index.php" ?
+ if ($args[0] == "index.php") {
+ // Then remove it
+ array_shift($args);
+ } // END - if
+
+ // Try to determine next parameters
+ foreach ($args as $arg) {
+ // Seperate arguemnt name from value
+ $argArray = explode("=", $arg);
+
+ // Is the second one set?
+ if (!isset($argArray[1])) {
+ // Add it likewise, but empty value
+ $this->setRequestElement($argArray[0], "");
+ } else {
+ // Set a name=value pair
+ $this->setRequestElement($argArray[0], $argArray[1]);
+ }
+ } // END - foreach