-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgaia.php
80 lines (63 loc) · 1.64 KB
/
gaia.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/*******************************************************************************
*
* @author : Dominik Bonsch <[email protected]>
* @date :
* @copyright : Webfrap Developer Network <[email protected]>
* @project : Webfrap Web Frame Application
* @projectUrl : http://webfrap.net
*
* @licence : BSD License see: LICENCE/BSD Licence.txt
*
* @version: @package_version@ Revision: @package_revision@
*
* Changes:
*
*******************************************************************************/
/**
* Die Gaia Command Console
* Über die Gaia Console lassen sich systeme verwalten
*/
// definieren, dass dies ein Syncscript ist
define( 'GAIA_CONTEXT', 'console' );
// die Basis Logik einbinden
include 'wbf/bootstrap.cli.php';
/* @var $console UiConsole */
/* @var $request IsARequest */
if( !$request->flag('s') )
{
$console->out( "Welcome to GAIA" );
$console->out( "What do you want to do?" );
}
$conClass = $request->service.'_Controller';
if( Gaia::classLoadable( $conClass ) )
{
$controller = new $conClass();
/* @var $controller MvcController */
$controller->setRequest( $request );
$controller->setConsole( $console );
try
{
$controller->execute( $request->action );
}
catch( GaiaException $exc )
{
$console->error( $exc->getMessage() );
}
}
else
{
$controller = new Error_Controller();
/* @var $controller MvcController */
$controller->setRequest( $request );
$controller->setConsole( $console );
try
{
$controller->missingService( $request->service );
}
catch( GaiaException $exc )
{
$console->error( $exc->getMessage() );
}
}
exit(0);