1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Nette\Security;
9:
10:
11: /**
12: * Authorizator checks if a given role has authorization
13: * to access a given resource.
14: */
15: interface IAuthorizator
16: {
17: /** Set type: all */
18: const ALL = NULL;
19:
20: /** Permission type: allow */
21: const ALLOW = TRUE;
22:
23: /** Permission type: deny */
24: const DENY = FALSE;
25:
26:
27: /**
28: * Performs a role-based authorization.
29: * @param string role
30: * @param string resource
31: * @param string privilege
32: * @return bool
33: */
34: function isAllowed($role, $resource, $privilege);
35:
36: }
37: