aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/Model/ActorEndpoints.php
blob: f6120d3fd24e92024c6dd246e1dc15477be71294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace WpfTest\Model;

use WpfTest\Model;

class ActorEndpoints extends Model {
    public ?int $actorId;
    public string $basicFeed;
    public ?string $fullFeed;
    public ?string $follow;
    public ?string $unfollow;
    public ?string $block;
    public ?string $unblock;
    public ?string $subscribe;
    public ?string $unsubscribe;

    protected function setOwnerId(int $id) {
        $this->actorId = $id;
    }

    protected function getUpdateWhereClause($db): ?string {
        if (self::findWhere('actor_id = ?', [$this->actorId]) != null) {
            return "actor_id = $this->actorId";
        }
        return null;
    }
}