Trending Tags
  • #bitcoin
  • #Bitcoin
  • #yarnstr
  • #threelaws
  • #socks
Trending Notes
Global
Trending Profiles
  • Kevin's Bacon
    @Kevin's Bacon
  • The Daniel ⚡️ and 84 sats
    @daniel
  • Brunswick
    @Brunswick
  • makomichi the wolf of weeb street
    @makomichi
  • node
    @node

Nostr View


Silberengel @Laeserin - 10mo

Getters and setters, or nah? https://media.tenor.com/Pt-gRP6TeMoAAAAC/yes-im-old-school-cass-dekennessy.gif #devs

2
0
3

Silberengel @Laeserin - 10mo

The code I'm finding online never seem to use them. Have they gone out of style?

1
0
3

The Fishcake🐶🐾 & 763 others @The Fishcake🐶🐾 - 10mo

It depends if you need to perform validation and transformation. Also if you variables are private or not

1
1
3

Silberengel @Laeserin - 10mo

The thing is... I might, later, and I don't want to have to decide now, so my internal refactoring-hater is like, just make all class properties private and get/set everything and then it's the same everywhere and you can put the decision off. 😅

1
1
3

Silberengel @Laeserin - 10mo

I think I picked up the habit from working with Doctrine and Symfony. I think they they're strict about that.

0
1
3

Silberengel @Laeserin - 10mo

Just found this, in an article: "Non private attributes does not only allow to change the state from outside, there is also the possibility to update attribute values from classes that inherit."

0
0
3

Silberengel @Laeserin - 10mo

You mean, as you can access over the __construct() ?

0
0
3

Silberengel @Laeserin - 10mo

Hmm. I don't think PHP does that.

0
0
3

Showing page 1 of 1 pages