blob: 56fbdb080468b5d67f9baf89dfbf16b8e9bb08eb (
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
28
29
30
31
32
33
34
35
36
37
|
<?php
namespace Digitigrade;
use Digitigrade\Model\Actor;
use Digitigrade\Model\Interaction;
use Digitigrade\Model\Note;
abstract class Policy {
/**
* Checks if an Actor is allowed and possibly alters it.
* @param Actor $actor the actor to check (may be modified in-place)
* @return bool true if allowed, false if the actor should be dropped
*/
public function checkActor(Actor $actor): bool {
return true;
}
/**
* Checks if an Interaction is allowed and possibly alters it.
* @param Interaction $interaction the interaction to check (may be modified in-place)
* @return bool true if allowed, false if the interaction should be dropped
*/
public function checkInteraction(Interaction $interaction): bool {
return true;
}
/**
* Checks if a Note is allowed and possibly alters it.
* @param Note $note the note to check (may be modified in-place)
* @return bool true if allowed, false if the note should be dropped
*/
public function checkNote(Note $note): bool {
return true;
}
// TODO: public function checkExtension()
}
|