當前位置: 首頁>>代碼示例>>PHP>>正文


PHP error::createInvalidMethodError方法代碼示例

本文整理匯總了PHP中error::createInvalidMethodError方法的典型用法代碼示例。如果您正苦於以下問題:PHP error::createInvalidMethodError方法的具體用法?PHP error::createInvalidMethodError怎麽用?PHP error::createInvalidMethodError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在error的用法示例。


在下文中一共展示了error::createInvalidMethodError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: format


//.........這裏部分代碼省略.........
             
              case "User":
              	//$this->conversationBlockStr .= '"pseudonyms_graph": "'.$this->site.':pseudonyms",';
                  $this->addUser($object);
                  break;
             
              case "UserSet":
              	//$this->conversationBlockStr .= '"pseudonyms_graph": "'.$this->site.':pseudonyms",';
                  $users = $object->users;
                  foreach ($users as $user){
                  	if (in_array($user->userid,$this->checkUsers) === FALSE) {
                  	    $this->addUser($user);
                  	    array_push($this->checkUsers, $user->userid);
                  	}
                  }
                  break;
             */
         /*
         case "URL":
         				$this->conversationBlockStr .= '"data_graph": "'.$this->site.':urls",';
              $this->addURL($object);
              $this->addURL($object);
              break;
         
         case "URLSet":
         				$this->conversationBlockStr .= '"data_graph": "'.$this->site.':urls",';
              $nodeUrls = $object->urls;
              $this->addURLs($nodeUrls);
              break;
         */
         /*
          case "Connection":
              $this->addConnection($object);
              break;
         
          case "User":
          	//$this->conversationBlockStr .= '"pseudonyms_graph": "'.$this->site.':pseudonyms",';
              $this->addUser($object);
              break;
         
          case "UserSet":
          	//$this->conversationBlockStr .= '"pseudonyms_graph": "'.$this->site.':pseudonyms",';
              $users = $object->users;
              foreach ($users as $user){
              	if (in_array($user->userid,$this->checkUsers) === FALSE) {
              	    $this->addUser($user);
              	    array_push($this->checkUsers, $user->userid);
              	}
              }
              break;
         */
         case "error":
             $doc .= "<error><message>" . $object->message . "</message><code>" . $object->code . "</code></error>";
             return $doc;
             break;
         default:
             //error as method not defined.
             global $ERROR;
             $ERROR = new error();
             $ERROR->createInvalidMethodError();
             include $HUB_FLM->getCodeDirPath("core/formaterror.php");
             die;
     }
     $this->namespaces = $this->trimFinalComma($this->namespaces);
     $this->namespaces .= '}';
     $this->mainStr .= $this->namespaces;
     $this->mainStr .= '],';
     if ($this->conversationBlockStr != "") {
         $this->outerGraphStr .= $this->conversationBlockStr;
     }
     // ADD ANNOTAION OUTER GRAPHS
     if ($this->annotationGraphListStr != "") {
         $this->outerGraphStr .= $this->annotationGraphListStr;
     }
     // ADD DATA GRAPH
     if ($this->dataGraphStr != "") {
         $this->outerGraphStr .= $this->dataGraphStr;
     }
     // ADD HISTORY GRAPH
     if ($this->historyGraphStr != "") {
         $this->outerGraphStr .= $this->historyGraphStr;
     }
     $this->outerGraphStr = $this->trimFinalComma($this->outerGraphStr);
     $this->outerGraphStr .= ']';
     $this->mainStr .= $this->outerGraphStr;
     $this->mainStr .= '}';
     if (isset($object->unobfuscationid) && $object->unobfuscationid != "" && $api_class != "UnobfuscatedUserSet") {
         $count = count($this->checkUsers);
         $users = "";
         for ($i = 0; $i < $count; $i++) {
             $userid = $this->checkUsers[$i];
             if ($userid != "") {
                 $users .= $userid . ",";
             }
         }
         $users = trimFinalComma($users);
         setObfuscationUsers($object->unobfuscationid, $users);
     }
     return $this->mainStr;
 }
開發者ID:uniteddiversity,項目名稱:DebateHub,代碼行數:101,代碼來源:jsonld.php

示例2: error

                    }
                    $response = $group;
                } else {
                    global $ERROR;
                    $ERROR = new error();
                    $ERROR->createAccessDeniedError();
                    include $HUB_FLM->getCodeDirPath("core/formaterror.php");
                    die;
                }
            }
            break;
        default:
            //error as method not defined.
            global $ERROR;
            $ERROR = new error();
            $ERROR->createInvalidMethodError();
            include $HUB_FLM->getCodeDirPath("core/formaterror.php");
            die;
    }
    //error_log("ENDING Initial data gathering");
    // finally format the output
    $jsonld = format_output_rest($response);
    if (isset($HUB_CACHE)) {
        $HUB_CACHE->setStringData($request, $jsonld, $CFG->CACHE_DEFAULT_TIMEOUT);
    }
} else {
    // write to file;
    //$file = 'cachedjsonld.txt';
    //$current .= $jsonld;
    //file_put_contents($file, $current);
    //error_log("JSONLD FOUND: resapi for ".$request);
開發者ID:uniteddiversity,項目名稱:LiteMap,代碼行數:31,代碼來源:restapi.php


注:本文中的error::createInvalidMethodError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。