DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

Remove staticness #11

Closed bakura10 closed 10 years ago

bakura10 commented 10 years ago

I'm not sure static is needed here: https://github.com/DASPRiD/Dash/blob/master/src/Dash/Mvc/Router/Http/Parser/PathSegmentFactory.php#L52

What's the use case?

DASPRiD commented 10 years ago

Well, I guess we can use self here as well. But would that make any difference?

bakura10 commented 10 years ago

What I don't understand is: why do you have this? Why don't you simply configure the plugin manager to be not shared?

I suppose the use case is to allow to have a sharing per route?

DASPRiD commented 10 years ago

Because only instances with the exact same configuration may be shared.

bakura10 commented 10 years ago

I see.... @ocramius: couldn't we have a smarter sharing with the new ServiceRequest object? Like a sharing PER ServiceRequest?

Ocramius commented 10 years ago

could work...

DASPRiD commented 10 years ago

Closing for now until the plug-in manager allows for this functionally.