2021-04-02 19:20:02 +02:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 11:52:11 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-04-02 19:20:02 +02:00
|
|
|
/**
|
|
|
|
* @copyright 2021 Podlibre
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Libraries;
|
|
|
|
|
2021-05-06 16:00:48 +02:00
|
|
|
use ActivityPub\Entities\Actor;
|
2021-05-12 16:00:25 +02:00
|
|
|
use ActivityPub\Objects\ActorObject;
|
2021-04-02 19:20:02 +02:00
|
|
|
use App\Models\PodcastModel;
|
|
|
|
|
2021-05-12 16:00:25 +02:00
|
|
|
class PodcastActor extends ActorObject
|
2021-04-02 19:20:02 +02:00
|
|
|
{
|
2021-05-18 19:16:36 +02:00
|
|
|
protected string $rss;
|
2021-04-02 19:20:02 +02:00
|
|
|
|
2021-05-06 16:00:48 +02:00
|
|
|
public function __construct(Actor $actor)
|
2021-04-02 19:20:02 +02:00
|
|
|
{
|
|
|
|
parent::__construct($actor);
|
|
|
|
|
2021-05-19 18:35:13 +02:00
|
|
|
$podcast = (new PodcastModel())->where('actor_id', $actor->id)
|
|
|
|
->first();
|
2021-04-02 19:20:02 +02:00
|
|
|
|
|
|
|
$this->rss = $podcast->feed_url;
|
|
|
|
}
|
|
|
|
}
|