本文整理汇总了PHP中manager::getNewLogootDel方法的典型用法代码示例。如果您正苦于以下问题:PHP manager::getNewLogootDel方法的具体用法?PHP manager::getNewLogootDel怎么用?PHP manager::getNewLogootDel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类manager
的用法示例。
在下文中一共展示了manager::getNewLogootDel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: operationToLogootOp
/**
*transforms a string operation from a patch page into a logoot operation
* insertion or deletion
* returns false if there is a problem with the type of the operation
*
* @param <String> $operation
* @return <Object> logootOp
*/
function operationToLogootOp($operation)
{
wfDebugLog('p2p', '@@@@@@@@@@@@@@@@@@@@@@@@@@@ - function operationToLogootOp : ' . $operation);
$arr = array();
$res = explode(';', $operation);
foreach ($res as $key => $attr) {
$res[$key] = trim($attr, " ");
}
//echo $operation." <--\n";
//var_dump($res);
$position = $res[2];
$position = str_ireplace('(', '', $position);
$position = str_ireplace(')', '', $position);
$res1 = explode(' ', $position);
foreach ($res1 as $id) {
$id1 = explode(':', $id);
$idArrray = new LogootId($id1[0], $id1[1], $id1[2]);
$arr[] = $idArrray;
}
$logootPos = new LogootPosition($arr);
/*$id1 = str_ireplace('(', '', $res[2]);
$id2 = $res[3];
$id3 = str_ireplace(')', '', $res[4]);
$idArrray = new LogootId($id1, $id2, $id3);
echo $logootPos->toString();*/
// if(strpos($res[3], '-5B-5B')!==false || strpos($res[3], '-5D-5D')!==false) {
// $res[3] = utils::decodeRequest($res[3]);
// }
$res[3] = utils::contentDecoding($res[3]);
// if($res[3]=="") $res[3]="\r\n";
if ($res[1] == "Insert") {
$logootOp = manager::getNewLogootIns($logootPos, $res[3]);
//new LogootIns($logootPos, $res[3]);
} elseif ($res[1] == "Delete") {
$logootOp = manager::getNewLogootDel($logootPos, $res[3]);
//new LogootDel($logootPos, $res[3]);
} else {
$logootOp = false;
}
//echo $logootOp;
return $logootOp;
}