DynamicRole.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
14 
15 /**
16  * DynamicRole is the interface for user roles based on attributes.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 interface DynamicRole {
21 
22  /**
23  * Check if this role matches for a user and resource.
24  * @param $user The user instance.
25  * @param $resource The resource string.
26  * @return Boolean whether the role matches or not, null if the result is undefined
27  */
28  public function match(User $user, $resource);
29 }
30 ?>
match(User $user, $resource)
Check if this role matches for a user and resource.
DynamicRole is the interface for user roles based on attributes.
Definition: DynamicRole.php:20
User is the interface for users.
Definition: User.php:18