コード例 #1
0
 static function stProcessRequest($URL)
 {
     $_URL = DispatchDispatcher::_stGetURLMatch($URL);
     $dispatchTable = LoadConfig::stGetDispatchTable();
     //DispatchDispatcher::$request = $URL;
     foreach ($dispatchTable as $urlMatch => $config) {
         // TODO puede hacer problemas con la @ ?
         if (preg_match("@" . $urlMatch . "@", $_URL, $match) === 1) {
             $obj = call_user_func_array(array($config["class"], "stVirtualConstructor"), array(DispatchDispatcher::stGetUrlArg($URL, $urlMatch, $config)));
             return $obj->printOutput();
         }
     }
     echo DispatchDispatcher::stPageNotFound();
 }