本文整理汇总了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;
}
示例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);