-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexample.php
61 lines (48 loc) · 1.29 KB
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
use agoalofalife\bpm\KernelBpm;
use agoalofalife\bpm\SourcesConfigurations\File;
require_once './vendor/autoload.php';
$test = new KernelBpm();
$file = new File();
// 1.Option
// set file with configuration | pre settings
//$file->setSource(__DIR__ . '/config/apiBpm.php');
//$test->loadConfiguration($file);
// 2.Option
// set configuration manually
$test->setConfigManually('apiBpm', [
'UrlLogin' => '',
'Login' => '',
'Password' => '',
'UrlHome' => ''
]);
// 3, Setting collection
$test->setCollection('CaseCollection');
// 4. get Cookie or just auth
//$test->authentication();
// 5. Example Reading from API
//$test = $test->action('read:json', function ($read){
// $read->amount(1)->skip(100);
//
//})->get();
//
//dd($test->toArray(), '?');
// 6.Example Creating from API
//$test = $test->action('create:xml', function ($creator){
// $creator->setData([
// // array key => value
// ]);
//})->get();
//dd($test, 'done');
// 7 Example Update from API
//$test = $test->action('update:json', function ($creator){
// $creator->guid('')->setData([
// 'Number' => 'SR00006250(testJson)'
// ]);
//})->get();
//dd($test);
// 8. Example delete
$test = $test->action('delete:xml', function ($creator){
$creator->guid('');
})->get();
dd($test);