| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace Salient\Contract\Core\Entity; |
| 4: | |
| 5: | /** |
| 6: | * @api |
| 7: | */ |
| 8: | interface Writable |
| 9: | { |
| 10: | /** |
| 11: | * Get writable properties |
| 12: | * |
| 13: | * Returning `["*"]` has the same effect as returning every `protected` |
| 14: | * property of the class. |
| 15: | * |
| 16: | * @return string[] |
| 17: | */ |
| 18: | public static function getWritableProperties(): array; |
| 19: | |
| 20: | /** |
| 21: | * Set the value of a property |
| 22: | * |
| 23: | * @param mixed $value |
| 24: | */ |
| 25: | public function __set(string $name, $value): void; |
| 26: | |
| 27: | /** |
| 28: | * Unset a property |
| 29: | */ |
| 30: | public function __unset(string $name): void; |
| 31: | } |
| 32: |