| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace Salient\Contract\Core; |
| 4: | |
| 5: | /** |
| 6: | * @api |
| 7: | * |
| 8: | * @template TKey of array-key |
| 9: | * @template TValue |
| 10: | */ |
| 11: | interface Arrayable |
| 12: | { |
| 13: | /** |
| 14: | * Get the object as an array |
| 15: | * |
| 16: | * @return ($preserveKeys is true ? array<TKey,TValue> : list<TValue>) |
| 17: | */ |
| 18: | public function toArray(bool $preserveKeys = true): array; |
| 19: | } |
| 20: |