diff options
Diffstat (limited to 'Digitigrade/Model/FollowRelation.php')
| -rw-r--r-- | Digitigrade/Model/FollowRelation.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Digitigrade/Model/FollowRelation.php b/Digitigrade/Model/FollowRelation.php index fc43a6f..0af9da5 100644 --- a/Digitigrade/Model/FollowRelation.php +++ b/Digitigrade/Model/FollowRelation.php @@ -34,4 +34,18 @@ class FollowRelation extends Model { public static function findByActors(Actor $subject, Actor $object): ?self { return self::findWhere('subject = ? and object = ?', [$subject->id, $object->id]); } + + /** + * @return self[] + */ + public static function findAllWithSubject(Actor $subject): array { + return self::findAllWhere('subject = ?', [$subject->id]); + } + + /** + * @return self[] + */ + public static function findAllWithObject(Actor $object): array { + return self::findAllWhere('object = ?', [$object->id]); + } }
\ No newline at end of file |
