示例#1
0
文件: cache.php 项目: vanie3/appland
 public static function makeId()
 {
     $app = MFactory::getApplication();
     if (!empty($app->registeredurlparams)) {
         $registeredurlparams = $app->registeredurlparams;
     } else {
         return md5(serialize(MRequest::getURI()));
     }
     $registeredurlparams->format = 'WORD';
     $registeredurlparams->option = 'WORD';
     $registeredurlparams->view = 'WORD';
     $registeredurlparams->layout = 'WORD';
     $registeredurlparams->tpl = 'CMD';
     $registeredurlparams->id = 'INT';
     $safeuriaddon = new stdClass();
     foreach ($registeredurlparams as $key => $value) {
         $safeuriaddon->{$key} = MRequest::getVar($key, null, 'default', $value);
     }
     return md5(serialize($safeuriaddon));
 }