tWithScopes
MMO\oauth\classes · 1 symbol · generated 5 Oct 2026
tWithScopes
tWithScopes.php:11trait to implement iScopeProvider. Its setters record the change with markChanged(): an entity has it, another class using the trait implements it.
- Namespace
MMO\oauth\classes
Index
| scopes | ||
| allow($uids) | Add scope if it is not already disallowed | |
| applyScopes($scopes, $set) | Apply this scopes onto a list of scopes | |
| blameScope($uid) | ||
| clearScopes() | ||
| disallow($uids) | ||
| getScope($uid) | ||
| getScopes() | Return an array of scopes associated with the token. | |
| hasScope($uid) | ||
| isAllowed($uids) | Test if all scopes are allowed | |
| isAnyAllowed($uids) | Test if any scope is allowed Scopes expressed as string can be a list of scope's uid seperated by a space (in this case, all scopes MUST be allowed). | |
| markChanged($keys) abstract | Record that properties changed (scopes), so they are saved: aEntity::markChanged | |
| scopesText($separator, $true, $false) | ||
| setScope($uid, $value) | Set the scope's value | |
| setScopes($scopes) |
Properties1
scopes
- Type
- array
Methods14
allow($uids)
tWithScopes.php:100Add scope if it is not already disallowed
applyScopes($scopes, $set)
tWithScopes.php:136Apply this scopes onto a list of scopes
| $scopes | array | list of {scope:uid} => {allow:bool} |
| $set = false | bool | mergeScopes |
| returns | void |
blameScope($uid)
tWithScopes.php:52clearScopes()
tWithScopes.php:91| returns | void |
disallow($uids)
tWithScopes.php:106getScope($uid)
tWithScopes.php:27getScopes()
tWithScopes.php:40Return an array of scopes associated with the token.
| returns | array | bool> |
hasScope($uid)
tWithScopes.php:31isAllowed($uids)
tWithScopes.php:116Test if all scopes are allowed
isAnyAllowed($uids)
tWithScopes.php:125Test if any scope is allowed Scopes expressed as string can be a list of scope's uid seperated by a space (in this case, all scopes MUST be allowed).
markChanged($keys)
abstracttWithScopes.php:25Record that properties changed (scopes), so they are saved: aEntity::markChanged
scopesText($separator, $true, $false)
tWithScopes.php:44setScope($uid, $value)
tWithScopes.php:65Set the scope's value