CLI Base App

This commit is contained in:
2022-11-09 15:25:59 -03:00
parent 02a68d9190
commit 11d8479a0c
10 changed files with 146 additions and 0 deletions

View 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));
}
];

View 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'
]);
}
];

View File

@ -0,0 +1,4 @@
<?php
return [
'log_file' => '/logs/php.log'
];