| 1 | <?php |
||
| 12 | class Capability implements Rule { |
||
| 13 | /** |
||
| 14 | * The name of the capability, e.g. jetpack.backups.restore |
||
| 15 | * |
||
| 16 | * @var string name |
||
| 17 | */ |
||
| 18 | public $name; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The set of rules used to evaluate if permission is granted |
||
| 22 | * |
||
| 23 | * @var array rules |
||
| 24 | */ |
||
| 25 | private $rules; |
||
| 26 | |||
| 27 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
||
| 28 | public function __construct( $name ) { |
||
| 32 | |||
| 33 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
||
| 34 | public function add_rule( $rule ) { |
||
| 37 | |||
| 38 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
||
| 39 | public function check( ...$args ) { |
||
| 46 | } |
||
| 47 |