2021-04-02 17:20:02 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-04-02 17:20:02 +00: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 14:00:48 +00:00
|
|
|
use ActivityPub\Entities\Actor;
|
2021-05-12 14:00:25 +00:00
|
|
|
use ActivityPub\Objects\ActorObject;
|
2021-04-02 17:20:02 +00:00
|
|
|
use App\Models\PodcastModel;
|
|
|
|
|
2021-05-12 14:00:25 +00:00
|
|
|
class PodcastActor extends ActorObject
|
2021-04-02 17:20:02 +00:00
|
|
|
{
|
2021-05-18 17:16:36 +00:00
|
|
|
protected string $rss;
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
public function __construct(Actor $actor)
|
2021-04-02 17:20:02 +00:00
|
|
|
{
|
|
|
|
parent::__construct($actor);
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
$podcast = (new PodcastModel())->where('actor_id', $actor->id)
|
|
|
|
->first();
|
2021-04-02 17:20:02 +00:00
|
|
|
|
|
|
|
$this->rss = $podcast->feed_url;
|
|
|
|
}
|
|
|
|
}
|