mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-04 01:47:19 +02:00
40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?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[] $audioPath
|
|
*/
|
|
public function getAudioUrl(string | array $audioPath): string
|
|
{
|
|
helper('media');
|
|
|
|
return media_base_url($audioPath);
|
|
}
|
|
}
|