ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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{
6 die("Usage: ". basename(__FILE__) . " username password client infile [outfile]\n");
7}
8
9chdir(dirname(__FILE__));
10chdir('../../../../');
11
12include_once 'Services/Authentication/classes/class.ilAuthFactory.php';
13ilAuthFactory::setContext(ilAuthFactory::CONTEXT_CRON);
14
15$_COOKIE['ilClientId'] = $_SERVER['argv'][3];
16$_POST['username'] = $_SERVER['argv'][1];
17$_POST['password'] = $_SERVER['argv'][2];
18
19include_once './include/inc.header.php';
20
21echo "\r\n[Invoking BPMN2-Parser]\r\n";
22// -----------------------------------------------------------------------------
23require_once dirname(__FILE__) . '/classes/parser/class.ilBPMN2Parser.php';
24$parser = new ilBPMN2Parser();
25$infile_contents = file_get_contents($_SERVER['argv'][4]);
27
28if ($_SERVER['argv'][5])
29{
30 file_put_contents($_SERVER['argv'][5], $parse_result);
31} else {
32 echo $parse_result;
33}
34echo "\r\n[Finished Parsing]\r\n";
35// -----------------------------------------------------------------------------
$parser
Definition: BPMN2Parser.php:24
$_POST['username']
Definition: BPMN2Parser.php:16
$_COOKIE['ilClientId']
Definition: BPMN2Parser.php:15
$infile_contents
Definition: BPMN2Parser.php:25
$parse_result
Definition: BPMN2Parser.php:26
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']