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();
43 $tmp=array_keys($node->getNameSpaces(
false));
44 $r[
'namespace']=$tmp[0];
45 $r[
'namespaces']=$namespaces;
51 $r[
'content']=$content;
54 foreach ($namespaces as $pre=>$ns) {
55 foreach ($node->children($ns) as $k=>$v) {
56 $this->
add_node($v,
$r[
'children'], $pre,
true);
58 foreach ($node->attributes($ns) as $k=>$v) {
59 $r[
'attributes'][$k]=
"$pre:$v";
63 foreach ($node->children() as $k=>$v) {
67 foreach ($node->attributes() as $k=>$v) {
68 $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 335 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilDataInputElement\getPHP(), and ilDataObjectElement\getPHP().
337 if (!isset($element[
'children'])) {
342 foreach ((
array) $element[
'children'] as $child) {
343 if ($child[
'name'] ==
'extensionElements') {
344 foreach ($child[
'children'] as $extension) {
346 if ($extension[
'children'][0][
'namespace'] ==
'ilias') {
349 if ($extension[
'name'] == $prefix .
'properties') {
350 foreach ((
array) $extension[
'children'] as $child) {
351 if ($child[
'name'] ==
'dataobject') {
352 $retval[
'role'] = $child[
'attributes'][
'role'];
353 $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 112 of file class.ilBPMN2ParserUtils.php.
References $type, and array.
Referenced by ilIntermediateCatchEventElement\getPHP(), ilIntermediateThrowEventElement\getPHP(), ilSendTaskElement\getPHP(), ilReceiveTaskElement\getPHP(), ilStartEventElement\getPHP(), ilEndEventElement\getPHP(), and ilWorkflowScaffold\getStartEventInfo().
114 $descriptor_extension =
array();
115 $subject_extension =
array();
116 $context_extension =
array();
117 $timeframe_extension =
array();
119 foreach ($bpmn2_array[
'children'] as $element) {
120 if ($element[
'name'] ==
$type && $element[
'attributes'][
'id'] == $start_event_ref) {
121 $bpmn_extension_elements = $element[
'children'][0];
122 $extension_elements = $bpmn_extension_elements[
'children'][0][
'children'];
124 foreach ($extension_elements as $child) {
126 if ($child[
'namespace'] ==
'ilias') {
129 if ($child[
'name'] == $prefix .
'eventDescriptor') {
130 $descriptor_extension = $child;
132 if ($child[
'name'] == $prefix .
'eventSubject') {
133 $subject_extension = $child;
136 if ($child[
'name'] == $prefix .
'eventContext') {
137 $context_extension = $child;
140 if ($child[
'name'] == $prefix .
'eventTimeframe') {
141 $timeframe_extension = $child;
147 $event_definition =
array(
148 'type' => $descriptor_extension[
'attributes'][
'type'],
149 'content' => $descriptor_extension[
'attributes'][
'name'],
150 'subject_type' => $subject_extension[
'attributes'][
'type'],
151 'subject_id' => $subject_extension[
'attributes'][
'id'],
152 'context_type' => $context_extension[
'attributes'][
'type'],
153 'context_id' => $context_extension[
'attributes'][
'id'],
154 'listening_start' => $timeframe_extension[
'attributes'][
'start'],
155 'listening_end' => $timeframe_extension[
'attributes'][
'end']
158 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 303 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilDataInputElement\getPHP().
305 if (!isset($element[
'children'])) {
310 foreach ((
array) $element[
'children'] as $child) {
311 if ($child[
'name'] ==
'extensionElements') {
312 foreach ($child[
'children'] as $extension) {
314 if ($extension[
'children'][0][
'namespace'] ==
'ilias') {
317 if ($extension[
'name'] == $prefix .
'properties') {
318 foreach ((
array) $extension[
'children'] as $child) {
319 if ($child[
'name'] ==
'inputproperty') {
320 $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 222 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilCallActivityElement\getPHP().
224 $library_call =
array();
225 foreach ($element[
'children'] as $child) {
226 if ($child[
'name'] ==
'extensionElements') {
227 foreach ($child[
'children'] as $extension) {
229 if ($extension[
'namespace'] ==
'ilias') {
232 if ($extension[
'name'] == $prefix .
'properties') {
233 if ($extension[
'children'][0][
'name'] == $prefix .
'libraryCall') {
234 $library_call = $extension[
'children'][0][
'attributes'];
245 'include_filename' => $library_call[
'location'],
246 '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 368 of file class.ilBPMN2ParserUtils.php.
References array.
Referenced by ilMessageDefinitionElement\getMessageDefinitionArray().
370 if (!isset($element[
'children'])) {
375 foreach ((
array) $element[
'children'] as $child) {
376 if ($child[
'name'] ==
'extensionElements') {
377 foreach ($child[
'children'] as $extension) {
379 if ($extension[
'children'][0][
'namespace'] ==
'ilias') {
382 if ($extension[
'name'] == $prefix .
'properties') {
383 foreach ((
array) $extension[
'children'] as $child) {
384 if ($child[
'attributes'][
'name'] ==
'mailtext') {
385 $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 255 of file class.ilBPMN2ParserUtils.php.
References $code.
258 foreach ($element[
'children'] as $child) {
259 if ($child[
'name'] ==
'script') {
260 $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 168 of file class.ilBPMN2ParserUtils.php.
References $end, $type, array, and date.
Referenced by ilIntermediateCatchEventElement\getPHP(), ilReceiveTaskElement\getPHP(), and ilStartEventElement\getPHP().
171 foreach ($bpmn2_array[
'children'] as $elements) {
172 foreach ($elements[
'children'] as $element) {
173 if ($element[
'name'] ==
$type) {
174 foreach ((
array) $element[
'children'] as $event_child) {
175 if ($event_child[
'name'] ==
'timerEventDefinition') {
176 if ($event_child[
'children'][0][
'name'] ==
'timeDate') {
177 $content = $event_child[
'children'][0][
'content'];
178 $start =
date(
'U', strtotime($content));
182 'type' =>
'time_passed',
183 'content' =>
'time_passed',
184 'subject_type' =>
'none',
186 'context_type' =>
'none',
188 'listening_start' => $start,
189 'listening_end' =>
$end 193 if ($event_child[
'children'][0][
'name'] ==
'timeDuration') {
194 $content = $event_child[
'children'][0][
'content'];
195 $interval = new \DateInterval(strtotime($content));
196 $duration = ($interval->d * 24 * 60 * 60) + ($interval->h * 60 * 60) +
197 ($interval->i * 60) + $interval->s;
200 'type' =>
'time_passed',
201 'content' =>
'time_passed',
202 'subject_type' =>
'none',
204 'context_type' =>
'none',
206 'listening_relative'=> 1,
207 'listening_interval'=> $duration
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 83 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().
100 $xsID_converted = str_replace(
'.',
'__period__', $xsID);
101 $xsID_converted = str_replace(
'-',
'__hyphen__', $xsID_converted);
102 return $xsID_converted;
The documentation for this class was generated from the following file: