Skip to content

Commit

Permalink
Add IteratorAggregate usage for SelectEntries
Browse files Browse the repository at this point in the history
Makes it possible to leave out the explicit getIterator call
when using SelectEntries.
  • Loading branch information
iquito committed Apr 29, 2019
1 parent b0e58e7 commit b9a8741
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Action/MultiSelectEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Select query builder as a fluent object - build query and return entries or flattened fields
*/
class MultiSelectEntries implements ActionInterface
class MultiSelectEntries implements ActionInterface, \IteratorAggregate
{
/**
* @var MultiRepositoryReadOnlyInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Action/MultiSelectEntriesFreeform.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Select query builder as a fluent object - build query and return entries or flattened fields
*/
class MultiSelectEntriesFreeform implements ActionInterface
class MultiSelectEntriesFreeform implements ActionInterface, \IteratorAggregate
{
/**
* @var MultiRepositoryReadOnlyInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Action/SelectEntries.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Select query builder as a fluent object - build query and return object(s) or flattened fields
*/
class SelectEntries implements ActionInterface
class SelectEntries implements ActionInterface, \IteratorAggregate
{
/**
* @var RepositoryReadOnlyInterface Repository we call to execute the built query
Expand Down
2 changes: 1 addition & 1 deletion src/Generate/RepositoriesGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function select(): \{namespaceOfBuilders}\SelectEntries
* so we instead imitate it. This way the implementation in SelectEntries can change
* and this generated class has no ties to how it "works" or how the repository is used.
*/
class SelectEntries implements \Squirrel\Entities\Action\ActionInterface
class SelectEntries implements \Squirrel\Entities\Action\ActionInterface, \IteratorAggregate
{
/**
* @var \Squirrel\Entities\Action\SelectEntries
Expand Down

0 comments on commit b9a8741

Please sign in to comment.