DASPRiD / Dash

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

`HostnameSegmentFactory` uses static singleton instances locally #16

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

https://github.com/DASPRiD/Dash/blob/2271fdbfdb7a627f22cb8cb51223a6ec1a98aeeb/src/Dash/Mvc/Router/Http/Parser/HostnameSegmentFactory.php uses static instances to save instantiation performance logic. Instead, simply sharing the hostname segment routes in the service container would be easier, cleaner and more flexible

DASPRiD commented 10 years ago

Nope, right now the plugin manager does not allow sharing instances based on unique options.

DASPRiD commented 10 years ago

For reference, see #11.