src/Api/BrcBackend/DTO/ProfilesList.php line 5

Open in your IDE?
  1. <?php
  2. namespace App\Api\BrcBackend\DTO;
  3. final class ProfilesList extends PaginationList
  4. {
  5.     private array $profiles = [];
  6.     /**
  7.      * @param array $profilesList
  8.      *
  9.      * @throws \Exception
  10.      */
  11.     public function __construct(array $profilesList)
  12.     {
  13.         parent::__construct($profilesList);
  14.         foreach ($profilesList['items'] as $profile) {
  15.             $this->profiles[] = new Profile($profile);
  16.         }
  17.     }
  18.     /**
  19.      * @return array<Profile>
  20.      */
  21.     public function getProfiles(): array
  22.     {
  23.         return $this->profiles;
  24.     }
  25. }