static function stGetUrlArg($URL, $urlMatch, $config)
 {
     $URL = DispatchDispatcher::stRelativizeUrl($URL);
     $class = $config["class"];
     $ret = array();
     if (preg_match_all("%<(.[^>]*)%", $urlMatch, $match)) {
         preg_match("%" . $urlMatch . "%", $URL, $match);
         foreach ($match as $param => $value) {
             if (isset($class::stGetObjFields()[$param])) {
                 $ret[$param] = $value;
             }
         }
     }
     if (isset($config["method"])) {
         $method = $config["method"];
     } else {
         return $ret;
     }
     foreach ($method as $param => $value) {
         // No soportamos page.html?myarray[]=1
         if ($method != $_FILES && is_array($value)) {
             continue;
         }
         // TODO soporte para optionalGETParams y obligatoryGETParams
         $ret[$param] = $value;
     }
     return $ret;
 }
示例#2
0
<?php

require_once dirname(__FILE__) . '/Load/classes/LoadInit.php';
DispatchDispatcher::stProcessRequest($_SERVER["REQUEST_URI"]);