17 include_once (
"FDL/Class.Doc.php");
24 $noredirect = (strtolower(substr($action->
getArgument(
"redirect") , 0, 1)) ==
"n");
40 $err = sprintf(_(
"Method %s cannot be call by client. Must be exposable method") ,
$method);
44 if (
$err !=
"") $action->AddWarningMsg(
$err);
45 $action->AddLogMsg(sprintf(_(
"method %s executed for %s ") ,
$method,
$doc->title));
50 if ($zone) $opt =
"&zone=$zone";
51 $referer = isset(
$_SERVER[
"HTTP_REFERER"]) ?
$_SERVER[
"HTTP_REFERER"] : null;
53 Header(
"Location: $referer");
56 redirect($action,
"FDL", sprintf(
"FDL_CARD%s&id=%d", $opt,
$doc->id));
59 if (
$err) $action->lay->template = htmlspecialchars(
$err, ENT_QUOTES);
60 else $action->lay->template = htmlspecialchars(sprintf(_(
"method %s applied to document %s #%d") ,
$method,
$doc->title,
$doc->id) , ENT_QUOTES);
61 $action->lay->noparse =
true;
75 $err = $parseMethod->getError();
78 $staticClass = $parseMethod->className;
79 if (!$staticClass) $staticClass = get_class($object);
80 $methodName = $parseMethod->methodName;
83 $refMeth =
new ReflectionMethod($staticClass, $methodName);
84 $mComment = $refMeth->getDocComment();
85 if (!preg_match(
'/' .
$comment .
'\b/', $mComment)) {
87 $syserr =
ErrorCode::getError(
"DOC1100", $refMeth->getDeclaringClass()->getName() , $refMeth->getName() , $object);
88 $action->log->error($syserr);
93 $err = $e->getMessage();
fdl_method(Action &$action)
static getError($code, $args=null)
exitError($texterr, $exit=true, $code="")
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')
if($file) if($subject==""&&$file) if($subject=="") $err
commentMethodMatch(&$object, $method, $comment)