mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-11 16:55:46 +00:00
39 lines
817 B
PHP
39 lines
817 B
PHP
![]() |
<?php
|
||
|
|
||
|
/**
|
||
|
* Class AnalyticsPodcastsByService
|
||
|
* Entity for AnalyticsPodcastsByService
|
||
|
* @copyright 2020 Podlibre
|
||
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
||
|
* @link https://castopod.org/
|
||
|
*/
|
||
|
|
||
|
namespace App\Entities;
|
||
|
|
||
|
use CodeIgniter\Entity;
|
||
|
|
||
|
class AnalyticsPodcastsByService extends Entity
|
||
|
{
|
||
|
/**
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $labels;
|
||
|
|
||
|
protected $casts = [
|
||
|
'podcast_id' => 'integer',
|
||
|
'app' => '?string',
|
||
|
'device' => '?string',
|
||
|
'os' => '?string',
|
||
|
'is_bot' => 'boolean',
|
||
|
'date' => 'datetime',
|
||
|
'hits' => 'integer',
|
||
|
];
|
||
|
|
||
|
public function getLabels()
|
||
|
{
|
||
|
return \Opawg\UserAgentsPhp\UserAgentsRSS::getName(
|
||
|
$this->attributes['labels']
|
||
|
) ?? $this->attributes['labels'];
|
||
|
}
|
||
|
}
|