This repository has been archived on 2025-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
misuzu-interim/src/Perms/PermissionResult.php

17 lines
364 B
PHP
Raw Normal View History

2023-08-30 22:37:21 +00:00
<?php
namespace Misuzu\Perms;
class PermissionResult implements IPermissionResult {
use PermissionResultShared;
public function __construct(private int $calculated) {}
public function getCalculated(): int {
return $this->calculated;
}
public function check(int $perm): bool {
return ($this->calculated & $perm) > 0;
}
}