2020-06-12 20:41:09 +00:00
|
|
|
<?php
|
2020-08-04 11:25:22 +00:00
|
|
|
|
2020-06-12 20:41:09 +00:00
|
|
|
/**
|
|
|
|
* Class AnalyticsPodcastsByCountry
|
|
|
|
* Entity for AnalyticsPodcastsByCountry
|
|
|
|
* @copyright 2020 Podlibre
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
2020-08-04 11:25:22 +00:00
|
|
|
|
2021-04-14 15:58:40 +00:00
|
|
|
namespace Analytics\Entities;
|
2020-06-12 20:41:09 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
use datetime;
|
|
|
|
use CodeIgniter\Entity\Entity;
|
2020-06-12 20:41:09 +00:00
|
|
|
|
|
|
|
class AnalyticsPodcastsByCountry extends Entity
|
|
|
|
{
|
2020-11-30 11:45:41 +00:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $labels;
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
2020-06-12 20:41:09 +00:00
|
|
|
protected $casts = [
|
|
|
|
'podcast_id' => 'integer',
|
|
|
|
'country_code' => 'string',
|
|
|
|
'date' => 'datetime',
|
|
|
|
'hits' => 'integer',
|
|
|
|
];
|
2020-10-14 10:38:48 +00:00
|
|
|
|
|
|
|
public function getLabels()
|
|
|
|
{
|
|
|
|
return lang('Countries.' . $this->attributes['labels']);
|
|
|
|
}
|
2020-06-12 20:41:09 +00:00
|
|
|
}
|