symfony/symfony — Issue #2685: [HttpFoundation] copy-paste in HttpFoundation
Author: andrewtch
Created: 2011-11-20 14:25:56+00:00
State: open

Well, when writing / implementing wildcard support in pull request symfony/symfony#2684 I noticed there are basically the following class hierarchy

HeaderBag
| - ReponseHeaderBag
ParameterBag
| - FileBag
| - ServerBag
Session

appearing there are three basic classes (HeaderBag, ParameterBag, Session) sharing the same functionality (add(), replace(), all(), keys(), replace(), get(), set(), has(), remove()).

Don't you think this should be refactored to some base (even abstract) class, something like AbstractBag to avoid repetitions? If yes, i can work on that.