Closed dbu closed 2 years ago
@dawehner @Crell would any of you be up to port this into the component? we are in quite a hurry if we want to get it into 1.2, as we do the RC1 on april 1st.
We do have a week long sprint before april 1st, so I am really optimistic to find some time, and if it is on the airport.
sounds great!
Tried to work a bit on that issue though the fact that the current lazy collection implements IteratorAggregate and not Iterator seems to make impossible to not break BC
if we can merge that today we would not need to worry about BC as this
code was never released. otherwise it should be simple to keep BC, just
have function getIterator() {return $this;}
no?
OH, I wasn't aware that this is possible. Hopefully I will find time this evening
On Mon, Mar 31, 2014 at 1:24 PM, David Buchmann notifications@github.comwrote:
if we can merge that today we would not need to worry about BC as this code was never released. otherwise it should be simple to keep BC, just have
function getIterator() {return $this;}
no?Reply to this email directly or view it on GitHubhttps://github.com/symfony-cmf/Routing/issues/97#issuecomment-39077735 .
@dawehner seems this was the original issue. i guess the getRouteCollection would be where we hook the factory into the DynamicRouter. and seems like the right place to configure things, and make it extensible through composition rather than class hierarchy.
drupal has a LazyLoadingRouteCollection which does load routes by batches.
we could generalize this by adding a PagingProviderInterface that route providers implement to support paging. it would need something like getAllRoutes(offset, limit) and a count method. then DynamicRouter::getRouteCollection could detect the interface on the provider and use the LazyCollection (or PagingCollection?).
that would encapsulate the logic in the right places.