mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 11:09:29 +00:00
Fixed step2 template
This commit is contained in:
parent
710569daaf
commit
1d38c50abc
2 changed files with 29 additions and 20 deletions
|
|
@ -24,12 +24,13 @@ namespace App\Services\InfoProviderSystem\DTOs;
|
|||
|
||||
use App\Entity\Parts\Part;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Represents the complete response from a bulk info provider search operation.
|
||||
* It contains a list of PartSearchResultDTOs, one for each part searched.
|
||||
*/
|
||||
readonly class BulkSearchResponseDTO implements \ArrayAccess
|
||||
readonly class BulkSearchResponseDTO implements \ArrayAccess, \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* @param BulkSearchPartResultsDTO[] $partResults Array of search results for each part
|
||||
|
|
@ -216,4 +217,9 @@ readonly class BulkSearchResponseDTO implements \ArrayAccess
|
|||
{
|
||||
throw new \LogicException('BulkSearchResponseDTO is immutable.');
|
||||
}
|
||||
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
return new \ArrayIterator($this->partResults);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue