Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow construction of wrapping iterators with iterators #3

Open
JeroenDeDauw opened this issue Nov 22, 2015 · 0 comments
Open

Allow construction of wrapping iterators with iterators #3

JeroenDeDauw opened this issue Nov 22, 2015 · 0 comments

Comments

@JeroenDeDauw
Copy link
Owner

Right now the only factory functions exposed take a reader:

public function newObjectDumpIterator( DumpReader $dumpReader, callable $onError = null ) {

public function newEntityDumpIterator( DumpReader $dumpReader, Deserializer $entityDeserializer, callable $onError = null ) {

This means one cannot decorate behaviour of the wrapped iterators, such as applying a LimitIterator on the lowest level (and not still end up doing deserilaization).

Can be solved by adding:

public function newObjectDumpIteratorFromIterator( Iterator $stringDumpIterator, callable $onError = null ) {

public function newEntityDumpIteratorFromIterator( Iterator $objectDumpIterator, Deserializer $entityDeserializer, callable $onError = null ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant