@Override
            public void collect(final ResultHandler<T> handler) throws CollectionAbortedException {
                resultHandler = handler;
                run(iterator);
            }
The method that will generate your results. Call yield() in here.
jphp-runtime/src/php/runtime/util/generator/Generator.java