Pairity/src/Contracts/DtoInterface.php
2025-12-10 07:01:07 -06:00

16 lines
320 B
PHP

<?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;
}