当前位置: 首页>>代码示例>>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;未经允许,请勿转载。