wCMF 4.1
Guides
Getting started
Architecture
Model
Persistence
Presentation
Configuration
Security
I18n & l10n
Tests
Versions
4.1.x
4.0.x
API
Classes
Hierarchy
Code
Support
home
travis
build
iherwig
wcmf
src
wcmf
lib
security
principal
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
*/
11
namespace
wcmf\lib\security\principal
;
12
13
use
wcmf\lib\security\principal\User
;
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
?>
wcmf\lib\security\principal\DynamicRole\match
match(User $user, $resource)
Check if this role matches for a user and resource.
wcmf\lib\security\principal\DynamicRole
DynamicRole is the interface for user roles based on attributes.
Definition:
DynamicRole.php:20
wcmf\lib\security\principal
 
Definition:
namespaces.php:87
wcmf\lib\security\principal\User
User is the interface for users.
Definition:
User.php:18