| 1 | <?php |
||
| 20 | class OauthScope implements ScopeEntityInterface |
||
| 21 | { |
||
| 22 | use EntityTrait; |
||
| 23 | |||
| 24 | public const SCOPE_EDITOR = 'editor'; |
||
| 25 | public const SCOPE_ADMIN = 'admin'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | public static $scopes = [ |
||
| 31 | self::SCOPE_ADMIN, |
||
| 32 | self::SCOPE_EDITOR, |
||
| 33 | ]; |
||
| 34 | |||
| 35 | public function __construct(string $identifier) |
||
| 43 | |||
| 44 | public static function constructEditorScope(): self |
||
| 48 | |||
| 49 | public static function constructAdminScope(): self |
||
| 53 | |||
| 54 | public static function hasScope(string $identifier): bool |
||
| 58 | |||
| 59 | public function jsonSerialize(): string |
||
| 63 | } |
||
| 64 |