shudder,
@shudder@phpc.social avatar

@bobmagicii It's called service locator and it's an anti pattern.

You can use it in abstract factory class/callback, where there won't be any dependency on (reference to) values returned from container.

You can also define composition in container itself - it will fail early in concrete place (front controller), so no major drawbacks.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • kavyap
  • ngwrru68w68
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • khanakhh
  • slotface
  • everett
  • vwfavf
  • rosin
  • osvaldo12
  • provamag3
  • GTA5RPClips
  • ethstaker
  • tacticalgear
  • InstantRegret
  • cisconetworking
  • cubers
  • tester
  • anitta
  • modclub
  • Leos
  • normalnudes
  • megavids
  • JUstTest
  • All magazines