Skip to content
Snippets Groups Projects
Actor.php 1.46 KiB
Newer Older
  • Learn to ignore specific revisions
  •  * @copyright  2020 Ad Aures
    
     * @license    https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
     * @link       https://castopod.org/
     */
    
    namespace App\Entities;
    
    use App\Models\PodcastModel;
    
    use Modules\Fediverse\Entities\Actor as FediverseActor;
    
    /**
     * @property Podcast|null $podcast
     * @property boolean $is_podcast
     */
    
        public function getIsPodcast(): bool
    
            return $this->getPodcast() instanceof Podcast;
    
        public function getPodcast(): ?Podcast
    
                throw new RuntimeException('Podcast id must be set before getting associated podcast.');
    
            if (! $this->podcast instanceof Podcast) {
    
                $this->podcast = (new PodcastModel())->getPodcastByActorId($this->id);
    
            if ($this->podcast instanceof Podcast) {
    
            if ($this->podcast instanceof Podcast) {