1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Core\Concern; |
4: | |
5: | use Salient\Contract\Core\Entity\Writable; |
6: | use Salient\Core\Internal\WritePropertyTrait; |
7: | |
8: | /** |
9: | * Implements Writable |
10: | * |
11: | * - If `_set<Property>()` is defined, it is called instead of assigning |
12: | * `$value` to `<Property>`. |
13: | * - If `_unset<Property>()` is defined, it is called to unset `<Property>` |
14: | * instead of assigning `null`. |
15: | * - The existence of `_set<Property>()` makes `<Property>` writable, regardless |
16: | * of {@see Writable::getWritableProperties()}'s return value. |
17: | * |
18: | * @api |
19: | * |
20: | * @see Writable |
21: | */ |
22: | trait HasWritableProperties |
23: | { |
24: | use WritePropertyTrait; |
25: | |
26: | public static function getWritableProperties(): array |
27: | { |
28: | return []; |
29: | } |
30: | } |
31: |