CLI Base App
This commit is contained in:
16
cli/setup/settings/01_env.php
Normal file
16
cli/setup/settings/01_env.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return [
|
||||
'email' => function() {
|
||||
$data = [
|
||||
'host' => $_ENV['EMAIL_HOST'],
|
||||
'username' => $_ENV['EMAIL_USERNAME'],
|
||||
'password' => $_ENV['EMAIL_PASSWORD'],
|
||||
'folder' => $_ENV['EMAIL_FOLDER'],
|
||||
'attachments' => $_ENV['ATTACHMENTS_FOLDER'],
|
||||
];
|
||||
if (isset($_ENV['EMAIL_PORT'])) {
|
||||
$data['port'] = $_ENV['EMAIL_PORT'];
|
||||
}
|
||||
return json_decode(json_encode($data));
|
||||
}
|
||||
];
|
18
cli/setup/settings/02_folders.php
Normal file
18
cli/setup/settings/02_folders.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
'base_folder' => dirname(__FILE__, 3),
|
||||
'resources_folder' => function(ContainerInterface $container) {
|
||||
return implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('base_folder'),
|
||||
'resources'
|
||||
]);
|
||||
},
|
||||
'commands_folder' => function(ContainerInterface $container) {
|
||||
return implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('resources_folder'),
|
||||
'commands'
|
||||
]);
|
||||
}
|
||||
];
|
4
cli/setup/settings/98_log.php
Normal file
4
cli/setup/settings/98_log.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'log_file' => '/logs/php.log'
|
||||
];
|
Reference in New Issue
Block a user