Class ilBPMN2ParserUtils.
More...
|
| add_node ($node, &$parent=null, $namespace='', $recursive=false) |
|
◆ add_node()
ilBPMN2ParserUtils::add_node |
( |
|
$node, |
|
|
& |
$parent = null , |
|
|
|
$namespace = '' , |
|
|
|
$recursive = false |
|
) |
| |
|
private |
- Parameters
-
| $node | |
null | $parent | |
string | $namespace | |
bool | $recursive | |
- Returns
- mixed
Definition at line 36 of file class.ilBPMN2ParserUtils.php.
References $namespace, and $r.
Referenced by load_string().
38 $namespaces = $node->getNameSpaces(
true);
41 $r[
'name']=$node->getName();
44 $tmp=array_keys($node->getNameSpaces(
false));
45 $r[
'namespace']=$tmp[0];
46 $r[
'namespaces']=$namespaces;
49 if ($content)
$r[
'content']=$content;
51 foreach ($namespaces as $pre=>$ns)
53 foreach ($node->children($ns) as $k=>$v)
55 $this->
add_node($v,
$r[
'children'], $pre,
true);
57 foreach ($node->attributes($ns) as $k=>$v)
59 $r[
'attributes'][$k]=
"$pre:$v";
63 foreach ($node->children() as $k=>$v)
68 foreach ($node->attributes() as $k=>$v)
70 $r[
'attributes'][$k]=
"$v";
if($err=$client->getError()) $namespace
add_node($node, &$parent=null, $namespace='', $recursive=false)
◆ extractDataNamingFromElement()
static ilBPMN2ParserUtils::extractDataNamingFromElement |
( |
|
$element | ) |
|
|
static |
◆ extractILIASDataObjectDefinitionFromElement()
static ilBPMN2ParserUtils::extractILIASDataObjectDefinitionFromElement |
( |
|
$element | ) |
|
|
static |
- Parameters
-
- Returns
- null|array
Definition at line 376 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilDataInputElement\getPHP(), and ilDataObjectElement\getPHP().
378 if(!isset($element[
'children']))
384 foreach((
array)$element[
'children'] as $child)
386 if($child[
'name'] ==
'extensionElements')
388 foreach($child[
'children'] as $extension)
391 if($extension[
'children'][0][
'namespace'] ==
'ilias')
395 if($extension[
'name'] == $prefix.
'properties')
397 foreach((
array)$extension[
'children'] as $child)
399 if($child[
'name'] ==
'dataobject')
401 $retval[
'role'] = $child[
'attributes'][
'role'];
402 $retval[
'type'] = $child[
'attributes'][
'type'];
Create styles array
The data for the language used.
◆ extractILIASEventDefinitionFromProcess()
static ilBPMN2ParserUtils::extractILIASEventDefinitionFromProcess |
( |
|
$start_event_ref, |
|
|
|
$type, |
|
|
|
$bpmn2_array |
|
) |
| |
|
static |
- Parameters
-
srting | $start_event_ref | |
string | $type | |
array | $bpmn2_array | |
- Returns
- array
Definition at line 114 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilIntermediateCatchEventElement\getPHP(), ilIntermediateThrowEventElement\getPHP(), ilSendTaskElement\getPHP(), ilReceiveTaskElement\getPHP(), ilStartEventElement\getPHP(), ilEndEventElement\getPHP(), and ilWorkflowScaffold\getStartEventInfo().
116 $descriptor_extension =
array();
117 $subject_extension =
array();
118 $context_extension =
array();
119 $timeframe_extension =
array();
121 foreach ($bpmn2_array[
'children'] as $element)
123 if ($element[
'name'] == $type && $element[
'attributes'][
'id'] == $start_event_ref)
125 $bpmn_extension_elements = $element[
'children'][0];
126 $extension_elements = $bpmn_extension_elements[
'children'][0][
'children'];
128 foreach ($extension_elements as $child)
131 if($child[
'namespace'] ==
'ilias')
135 if ($child[
'name'] == $prefix.
'eventDescriptor')
137 $descriptor_extension = $child;
139 if ($child[
'name'] == $prefix.
'eventSubject')
141 $subject_extension = $child;
144 if ($child[
'name'] == $prefix.
'eventContext')
146 $context_extension = $child;
149 if ($child[
'name'] == $prefix.
'eventTimeframe')
151 $timeframe_extension = $child;
157 $event_definition =
array(
158 'type' => $descriptor_extension[
'attributes'][
'type'],
159 'content' => $descriptor_extension[
'attributes'][
'name'],
160 'subject_type' => $subject_extension[
'attributes'][
'type'],
161 'subject_id' => $subject_extension[
'attributes'][
'id'],
162 'context_type' => $context_extension[
'attributes'][
'type'],
163 'context_id' => $context_extension[
'attributes'][
'id'],
164 'listening_start' => $timeframe_extension[
'attributes'][
'start'],
165 'listening_end' => $timeframe_extension[
'attributes'][
'end']
168 return $event_definition;
Create styles array
The data for the language used.
◆ extractILIASInputPropertiesFromElement()
static ilBPMN2ParserUtils::extractILIASInputPropertiesFromElement |
( |
|
$element | ) |
|
|
static |
- Parameters
-
- Returns
- null|array
Definition at line 336 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilDataInputElement\getPHP().
338 if(!isset($element[
'children']))
344 foreach((
array)$element[
'children'] as $child)
346 if($child[
'name'] ==
'extensionElements')
348 foreach($child[
'children'] as $extension)
351 if($extension[
'children'][0][
'namespace'] ==
'ilias')
355 if($extension[
'name'] == $prefix.
'properties')
357 foreach((
array)$extension[
'children'] as $child)
359 if($child[
'name'] ==
'inputproperty')
361 $retval[$child[
'attributes'][
'name']] = $child[
'attributes'][
'value'];
Create styles array
The data for the language used.
◆ extractILIASLibraryCallDefinitionFromElement()
static ilBPMN2ParserUtils::extractILIASLibraryCallDefinitionFromElement |
( |
|
$element | ) |
|
|
static |
- Parameters
-
- Returns
- array
Definition at line 240 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilCallActivityElement\getPHP().
242 $library_call =
array();
243 foreach($element[
'children'] as $child)
245 if($child[
'name'] ==
'extensionElements')
247 foreach($child[
'children'] as $extension)
250 if($extension[
'namespace'] ==
'ilias')
254 if($extension[
'name'] == $prefix.
'properties')
256 if($extension[
'children'][0][
'name'] == $prefix.
'libraryCall')
258 $library_call = $extension[
'children'][0][
'attributes'];
269 'include_filename' => $library_call[
'location'],
270 'class_and_method' => $library_call[
'api'] .
'::' . $library_call[
'method']
Create styles array
The data for the language used.
◆ extractILIASMessageDefinitionFromElement()
static ilBPMN2ParserUtils::extractILIASMessageDefinitionFromElement |
( |
|
$element | ) |
|
|
static |
- Parameters
-
- Returns
- null|array
Definition at line 417 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilMessageDefinitionElement\getMessageDefinitionArray().
419 if(!isset($element[
'children']))
425 foreach((
array)$element[
'children'] as $child)
427 if($child[
'name'] ==
'extensionElements')
429 foreach($child[
'children'] as $extension)
432 if($extension[
'children'][0][
'namespace'] ==
'ilias')
436 if($extension[
'name'] == $prefix.
'properties')
438 foreach((
array)$extension[
'children'] as $child)
440 if($child[
'attributes'][
'name'] ==
'mailtext')
442 $retval[
'mailtext'] = base64_encode($child[
'content']);
Create styles array
The data for the language used.
◆ extractScriptDefinitionFromElement()
static ilBPMN2ParserUtils::extractScriptDefinitionFromElement |
( |
|
$element | ) |
|
|
static |
- Parameters
-
- Returns
- string
Definition at line 279 of file class.ilBPMN2ParserUtils.php.
References $code.
282 foreach($element[
'children'] as $child)
284 if($child[
'name'] ==
'script')
286 $code = $child[
'content'];
◆ extractTimeDateEventDefinitionFromElement()
static ilBPMN2ParserUtils::extractTimeDateEventDefinitionFromElement |
( |
|
$start_event_ref, |
|
|
|
$type, |
|
|
|
$bpmn2_array |
|
) |
| |
|
static |
- Parameters
-
string | $start_event_ref | |
string | $type | |
array | $bpmn2_array | |
- Returns
- array
Definition at line 178 of file class.ilBPMN2ParserUtils.php.
References $duration, $start, array, and date.
Referenced by ilIntermediateCatchEventElement\getPHP(), ilReceiveTaskElement\getPHP(), and ilStartEventElement\getPHP().
181 foreach($bpmn2_array[
'children'] as $elements)
183 foreach($elements[
'children'] as $element)
185 if ($element[
'name'] == $type)
187 foreach((
array)$element[
'children'] as $event_child)
189 if($event_child[
'name'] ==
'timerEventDefinition')
191 if($event_child[
'children'][0][
'name'] ==
'timeDate')
193 $content = $event_child[
'children'][0][
'content'];
198 'type' =>
'time_passed',
199 'content' =>
'time_passed',
200 'subject_type' =>
'none',
202 'context_type' =>
'none',
204 'listening_start' =>
$start,
205 'listening_end' => $end
209 if($event_child[
'children'][0][
'name'] ==
'timeDuration')
211 $content = $event_child[
'children'][0][
'content'];
212 $interval = new \DateInterval(strtotime($content));
213 $duration = ($interval->d * 24 * 60 * 60) + ($interval->h * 60 * 60) +
214 ($interval->i * 60) + $interval->s;
217 'type' =>
'time_passed',
218 'content' =>
'time_passed',
219 'subject_type' =>
'none',
221 'context_type' =>
'none',
223 'listening_relative'=> 1,
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
◆ load_string()
ilBPMN2ParserUtils::load_string |
( |
|
$xml_string | ) |
|
- Parameters
-
- Returns
- mixed
Definition at line 22 of file class.ilBPMN2ParserUtils.php.
References add_node().
24 $node=@simplexml_load_string($xml_string);
add_node($node, &$parent=null, $namespace='', $recursive=false)
◆ xsIDToPHPVarname()
static ilBPMN2ParserUtils::xsIDToPHPVarname |
( |
|
$xsID | ) |
|
|
static |
- Parameters
-
- Returns
- string
Definition at line 85 of file class.ilBPMN2ParserUtils.php.
Referenced by ilCallActivityElement\getPHP(), ilComplexGatewayElement\getPHP(), ilTaskElement\getPHP(), ilServiceTaskElement\getPHP(), ilSendTaskElement\getPHP(), ilScriptTaskElement\getPHP(), ilReceiveTaskElement\getPHP(), ilManualTaskElement\getPHP(), ilDataOutputElement\getPHP(), ilDataObjectReferenceElement\getPHP(), ilDataObjectElement\getPHP(), ilDataInputElement\getPHP(), ilParallelGatewayElement\getPHP(), ilInclusiveGatewayElement\getPHP(), ilExclusiveGatewayElement\getPHP(), ilEventBasedGatewayElement\getPHP(), ilIntermediateCatchEventElement\getPHP(), ilSequenceFlowElement\getPHP(), ilStartEventElement\getPHP(), ilEndEventElement\getPHP(), ilIntermediateThrowEventElement\getPHP(), and ilAssociationElement\getPHP().
102 $xsID_converted = str_replace(
'.',
'__period__',$xsID);
103 $xsID_converted = str_replace(
'-',
'__hyphen__',$xsID_converted);
104 return $xsID_converted;
The documentation for this class was generated from the following file: