* @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
* @license For full copyright and license information view LICENSE file distributed with this source code.
6
*/
7
declare(strict_types=1);
8
9
namespace eZ\Publish\API\Repository\Values\User;
10
11
use eZ\Publish\API\Repository\Values\ValueObject;
12
13
/**
14
* This class represents a role.
15
*
16
* @property-read int $id the internal id of the role
17
* @property-read string $identifier the identifier of the role
18
*
19
* @property-read \eZ\Publish\API\Repository\Values\User\Policy[] $policies an array of the policies {@link \eZ\Publish\API\Repository\Values\User\Policy} of the role.
20
*/
21
abstract class Role extends ValueObject
22
{
23
/** @var int Status constant for defined (aka "published") role */
24
const STATUS_DEFINED = 0;
25
26
/** @var int Status constant for draft (aka "temporary") role */
27
const STATUS_DRAFT = 1;
28
29
/**
30
* ID of the user role.
31
*
32
* @var int
33
*/
34
protected $id;
35
36
/**
37
* Readable string identifier of a role
38
* in 4.x. this is mapped to the role name.
39
*
40
* @var string
41
*/
42
protected $identifier;
43
44
/**
45
* The status of the role.
46
*
47
* @var int One of Role::STATUS_DEFINED|Role::STATUS_DRAFT