-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
43 lines (32 loc) · 978 Bytes
/
main.php
File metadata and controls
43 lines (32 loc) · 978 Bytes
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
<?php
/**
* Multi-Command CLI Application
*
* This is a comprehensive CLI application demonstrating:
* - Multiple command organization
* - Configuration management
* - Data persistence and CRUD operations
* - User management system
* - Export/import functionality
* - System monitoring and maintenance
* - Comprehensive error handling and logging
*/
use WebFiori\Cli\Runner;
// Load dependencies
require_once '../../vendor/autoload.php';
require_once 'AppManager.php';
require_once 'commands/UserCommand.php';
// Create and configure the CLI runner
$runner = new Runner();
// Register core commands
// Register application commands
$runner->register(new UserCommand());
// Set default command
// Initialize application
$app = new AppManager();
$app->log('info', 'Application started');
// Start the application
$exitCode = $runner->start();
// Log application shutdown
$app->log('info', "Application finished with exit code: $exitCode");
exit($exitCode);