Added detailed list of received/given likes in user profiles
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / IPermissionObject.class.php
1 <?php
2 namespace wcf\data;
3
4 /**
5 * Every object with permissions has to implement this interface.
6 *
7 * @author Matthias Schmidt
8 * @copyright 2001-2014 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package com.woltlab.wcf
11 * @subpackage data
12 * @category Community Framework
13 */
14 interface IPermissionObject {
15 /**
16 * Checks if the active user has the given permissions for this object and
17 * throws a PermissionDeniedException if they don't have one of the permissions.
18 *
19 * @param array<string> $permissions
20 */
21 public function checkPermissions(array $permissions);
22
23 /**
24 * Returns the permission value of the given permission for this object
25 * and the active user.
26 *
27 * @param string $permission
28 * @return mixed
29 */
30 public function getPermission($permission);
31 }