Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

More discrete API for generating route objects. #76

Open
dantleech opened this issue Apr 27, 2016 · 0 comments
Open

More discrete API for generating route objects. #76

dantleech opened this issue Apr 27, 2016 · 0 comments

Comments

@dantleech
Copy link
Member

Currently you need to instantiate a UriContextCollection in order to generate the auto routes.

$collection = new UriContextCollection($document);
$autoRouteManager->buildUriContextColleciton($collection);

foreach ($collection as $routeDocument) { 
   // ...
}

This is not a very clear interface, and I think we should encourage the explicit generation of auto routes in some situations rather than relying on Subscribers.

I propose to change the API to

$collection = $autoRouteManager->generate($document);

foreach ($collection as $routeDocument) { 
   // ...
}
@dantleech dantleech changed the title Autoroute manager to More discrete API for generating route objects. Apr 27, 2016
@dantleech dantleech added this to the 2.0 milestone Apr 27, 2016
@ElectricMaxxx ElectricMaxxx modified the milestones: 1.1, 2.0, 2.1 Nov 28, 2016
@dbu dbu removed this from the 2.1 milestone Aug 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants