26 $this->parentName = ($data[1] ==
"--" || $data[1] ==
"-") ?
"" : $data[1];
27 $this->famId = isset($data[3]) ? $data[3] : 0;
28 $this->famTitle = isset($data[2]) ? $data[2] : null;
29 $this->famClass = isset($data[4]) ? ($data[4] ==
"--" ?
"" : $data[4]) : null;
30 $this->famName = isset($data[5]) ? $data[5] :
'';
46 if (strstr(
$doc->usefor,
'W')) {
47 if (
$doc->classname) {
49 $checkCr = $checkW->verifyWorkflowClass();
50 if (count($checkCr) > 0) {
51 $this->
addError(implode(
"\n", $checkCr));
54 } elseif ($this->famClass) {
55 $this->checkClassFile($this->famClass);
63 return sprintf(
'FDL/Class.%s.php',
$className);
65 private function checkClassFile($phpfile)
68 $fileName = realpath($this->getClassFile($phpfile));
81 if (!$this->famName) {
83 } elseif (!preg_match(
'/^[a-z][a-z0-9_]{1,63}$/i', $this->famName)) {
86 $f =
getTDoc(
'', $this->famName);
87 if ($f && $f[
"doctype"] !=
'C') {
95 if ($this->famTitle) {
96 if (mb_strlen($this->famTitle) > 255) {
98 } elseif (preg_match(
"/\n|\t|\r/", $this->famTitle)) {
106 if ($this->parentName) {
107 if ($this->famName == $this->parentName) {
110 $p = getTdoc(
'', $this->parentName);
113 } elseif ($p[
"doctype"] !=
'C') {
117 $me = getTdoc(
'', $this->famName);
119 $fromId = $me[
'fromid'];
121 if ($fromName ==
'') {
122 throw new \Dcp\Exception(
"FAM0603", $fromId, $this->famName);
124 if (($fromName != $this->parentName) && ($fromId != $this->parentName)) {
checkClass(array $data, &$doc=null)
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
static getError($code, $args=null)
static phpLintFile($fileName, &$output)
getNameFromId($dbaccess, $id)
Check worflow definition when importing definition.
check(array $data, &$doc=null)