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: * Performs a role-based authorization.
28: * @param string|null
29: * @param string|null
30: * @param string|null
31: * @return bool
32: */
33: function isAllowed($role, $resource, $privilege);
34: }
35: