DASPRiD / Dash

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

Getters within `Segment` parser can be skipped #18

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

As of https://github.com/DASPRiD/Dash/blob/2271fdbfdb7a627f22cb8cb51223a6ec1a98aeeb/src/Dash/Mvc/Router/Http/Parser/Segment.php#L69, getters can be avoided. Direct property access is perfectly ok in the implementation of the method.

DASPRiD commented 10 years ago

The getter does lazy initialization. So, no.