refactor(modules): extract castopod parts into a modules/ folder for a scalable HMVC structure

- create Admin, Analytics, Auth, Fediverse and Install modules in the root modules/ folder
- rename
ActivityPub to Fediverse
This commit is contained in:
Yassine Doghri 2021-08-23 11:05:16 +00:00
commit 5083cd2fda
268 changed files with 4221 additions and 2186 deletions

View file

@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace Modules\Analytics\Config;
use CodeIgniter\Config\BaseConfig;
class Analytics extends BaseConfig
{
/**
* Gateway to analytic routes. By default, all analytics routes will be under `/analytics` path
*/
public string $gateway = 'analytics';
/**
* --------------------------------------------------------------------
* Route filters options
* --------------------------------------------------------------------
* @var array<string, string>
*/
public array $routeFilters = [
'analytics-full-data' => 'permission:podcasts-view,podcast-view',
'analytics-data' => 'permission:podcasts-view,podcast-view',
'analytics-filtered-data' => 'permission:podcasts-view,podcast-view',
];
/**
* get the full audio file url
*
* @param string|string[] $audioFilePath
*/
public function getAudioFileUrl(string|array $audioFilePath): string
{
helper('media');
return media_base_url($audioFilePath);
}
}