dbxapp
4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
dbxapp.de
Portal
Start
Anwender
Entwickler
KI-Bereiche
Loading...
Searching...
No Matches
install_demo.php
Go to the documentation of this file.
1
<?php
9
10
if
(PHP_SAPI !==
'cli'
) {
11
fwrite(STDERR,
"Dieses Werkzeug darf nur per CLI laufen.\n"
);
12
exit
(1);
13
}
14
15
$base
= dirname(__DIR__, 4);
16
chdir(
$base
);
17
$_SERVER
[
'REQUEST_URI'
] =
'/dbxapp/'
;
18
$_SERVER
[
'HTTP_HOST'
] =
'localhost'
;
19
$_SERVER
[
'HTTPS'
] =
'on'
;
20
$_SERVER
[
'SCRIPT_NAME'
] =
'/dbxapp/index.php'
;
21
$_SERVER
[
'REQUEST_METHOD'
] =
'GET'
;
22
23
define(
'dbxSystem'
,
'dbxWebApp'
);
24
define(
'dbxRunAsAdmin'
, 1);
25
26
require
$base
.
'/dbx/vendor/autoload.php'
;
27
require_once
$base
.
'/dbx/include/dbxKernel.php'
;
28
29
dbx
()->set_system_var(
'dbx_activ_modul'
,
'myInvoices'
);
30
dbx
()->set_system_var(
'dbx_activ_modul_id'
, 1);
31
dbx
()->set_system_var(
'dbx_activ_action'
,
'install'
);
32
dbx
()->set_modul_var(
'dbx_modul'
,
'myInvoices'
);
33
dbx
()->set_modul_var(
'dbx_run1'
,
'install'
);
34
35
$schemaOnly
= in_array(
'--schema-only'
,
$argv
,
true
);
36
$fixtures
=
dbx
()->get_include_obj(
37
'myInvoicesFixtures'
,
38
'myInvoices'
39
);
40
$result
=
$fixtures
->install(!
$schemaOnly
);
41
42
echo json_encode(
43
$result
,
44
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
45
) . PHP_EOL;
46
exit
((
int
)(
$result
[
'ok'
] ?? 0) === 1 ? 0 : 1);
$_SERVER
$_SERVER['REQUEST_METHOD']
Definition
dbxApi_head_response_test.php:10
$base
$base
Definition
dbxApi_paths_test.php:11
$result
$result
Definition
dbxForm_validation_result_test.php:29
$argv
$argv
Definition
doxygen_utf8_filter_test.php:17
exit
exit
Definition
index.php:146
$schemaOnly
$schemaOnly
Definition
install_demo.php:35
$fixtures
$fixtures
Definition
myInvoices_integration_test.php:37
dbx
DBX schema administration.
dbx
modules
myInvoices
tools
install_demo.php
Generated by
1.17.0