-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow array-sourced models to provide records using generators
This removes the hard "array" return type for getRecords, and allows people to use generators (or other iterable types) to provide records. This should still be backwards compatible with other uses of the ArraySource trait that may already have a "getRecords" method with an array return type, due to covariance rules in PHP. It should be noted that each record must still be an array, it's only the "container" that can be traversable.
- Loading branch information
1 parent
9d73e77
commit a5820c3
Showing
2 changed files
with
73 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters