ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
BPMN2Parser.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4if ($_SERVER['argc'] < 5) {
5 die("Usage: " . basename(__FILE__) . " username password client infile [outfile]\n");
6}
7
8chdir(dirname(__FILE__));
9chdir('../../../../');
10
11include_once 'Services/Authentication/classes/class.ilAuthFactory.php';
12ilAuthFactory::setContext(ilAuthFactory::CONTEXT_CRON);
13
14$_COOKIE['ilClientId'] = $_SERVER['argv'][3];
15$_POST['username'] = $_SERVER['argv'][1];
16$_POST['password'] = $_SERVER['argv'][2];
17
18include_once './include/inc.header.php';
19
20echo "\r\n[Invoking BPMN2-Parser]\r\n";
21// -----------------------------------------------------------------------------
22require_once dirname(__FILE__) . '/classes/parser/class.ilBPMN2Parser.php';
23$parser = new ilBPMN2Parser();
24$infile_contents = file_get_contents($_SERVER['argv'][4]);
26
27if ($_SERVER['argv'][5]) {
28 file_put_contents($_SERVER['argv'][5], $parse_result);
29} else {
30 echo $parse_result;
31}
32echo "\r\n[Finished Parsing]\r\n";
33// -----------------------------------------------------------------------------
$parser
Definition: BPMN2Parser.php:23
$_POST['username']
Definition: BPMN2Parser.php:15
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:14
$infile_contents
Definition: BPMN2Parser.php:24
$parse_result
Definition: BPMN2Parser.php:25
An exception for terminatinating execution or to throw for unit testing.
static setContext($a_context)
set context
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']