1 | <?php |
||
11 | class RigidIdentifierHandler implements IdentifierHandlerInterface |
||
12 | { |
||
13 | /** |
||
14 | * Getter-method |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $getter; |
||
19 | |||
20 | /** |
||
21 | * Setter-method |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $setter; |
||
26 | |||
27 | /** |
||
28 | * RigidIdentifierHandler constructor. |
||
29 | * |
||
30 | * @param string $getter |
||
31 | * @param string $setter Optional. Should not be set if "setIdentifier" have to be ignored |
||
32 | */ |
||
33 | 2 | public function __construct(string $getter, string $setter = null) |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 1 | public function getIdentifier($object): string |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function setIdentifier($object, string $identifier) |
|
58 | } |