Pairity/src/Contracts/DtoInterface.php

16 lines
320 B
PHP
Raw Normal View History

2025-12-10 13:01:07 +00:00
<?php
namespace Pairity\Contracts;
interface DtoInterface
{
/**
* Convert DTO to array.
* When $deep is true (default), convert any nested DTO relations to arrays as well.
*
* @param bool $deep
* @return array<string,mixed>
*/
public function toArray(bool $deep = true): array;
}