dseguy, French
@dseguy@phpc.social avatar

abstract logic :

A concrete class can be made abstract again.

A concrete method cannot be made abstract again.

https://php-tips.readthedocs.io/en/latest/tips/abstract_again.html

shudder,
@shudder@phpc.social avatar

@dseguy The thing with inheritance is that it can be used either to create subtypes or to simply reuse some code and make a mess.

perfectykills,

@dseguy I asking myself when will it possible to declare a method protected or private in an interface. This would be extremly usefull

dseguy,
@dseguy@phpc.social avatar

@perfectykills i haven’t heard talks about that.
Protected methods can be achieved with an abstract class, though private would still be a challenge.
How would you use that?

perfectykills,

@dseguy my basic problems are just that I sometimes need to archive some state with multiple interfaces and internal function.

Something where I can call from the same class the function again.

Like for the decorator purpose.

If you dont want to extend a class endlessly but have some features to add in the construct.

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