2023-03-16 13:00:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Modules\Media\Config;
|
|
|
|
|
|
|
|
use CodeIgniter\Config\BaseConfig;
|
|
|
|
use Modules\Media\FileManagers\FS;
|
|
|
|
use Modules\Media\FileManagers\S3;
|
|
|
|
|
|
|
|
class Media extends BaseConfig
|
|
|
|
{
|
|
|
|
public string $fileManager = 'fs';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
|
|
|
public array $fileManagers = [
|
|
|
|
'fs' => FS::class,
|
|
|
|
's3' => S3::class,
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<string, null|string|bool>
|
|
|
|
*/
|
|
|
|
public array $s3 = [
|
2023-06-12 14:47:38 +00:00
|
|
|
'bucket' => 'castopod',
|
|
|
|
'key' => '',
|
|
|
|
'secret' => '',
|
|
|
|
'region' => '',
|
|
|
|
'protocol' => '',
|
|
|
|
'endpoint' => '',
|
|
|
|
'debug' => false,
|
2023-03-21 17:08:42 +00:00
|
|
|
'pathStyleEndpoint' => false,
|
2023-06-12 14:47:38 +00:00
|
|
|
'keyPrefix' => '',
|
2023-03-16 13:00:05 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Media Base URL
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* URL to your media root. Typically this will be your base URL,
|
|
|
|
* WITH a trailing slash:
|
|
|
|
*
|
|
|
|
* http://cdn.example.com/
|
|
|
|
*/
|
|
|
|
public string $baseURL = 'http://localhost:8080/';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Media root folder
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Defines the root folder for media files storage
|
|
|
|
*/
|
|
|
|
public string $root = 'media';
|
|
|
|
|
2023-03-28 16:13:04 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Media storage folder
|
|
|
|
* --------------------------------------------------------------------------
|
|
|
|
* Defines the folder used to store the media root folder
|
|
|
|
*/
|
|
|
|
public string $storage = ROOTPATH . 'public';
|
|
|
|
|
2023-03-16 13:00:05 +00:00
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
|
|
|
public array $folders = [
|
|
|
|
'podcasts' => 'podcasts',
|
2023-06-12 14:47:38 +00:00
|
|
|
'persons' => 'persons',
|
2023-03-16 13:00:05 +00:00
|
|
|
];
|
|
|
|
}
|