What are __defineGetter__() and __defineSetter__() functions?

See the MDN docs here for a description and example code:

A getter is a method that gets the value of a specific property. A setter is a method that sets the value of a specific property. You can define getters and setters on any predefined core object or user-defined object that supports the addition of new properties.

As noted in the docs (and by @ cwallenpoole), __define[GS]etter__() functions are now deprecated. There’s a lot more detail in this article. I believe the defineProperty() function is now the preferred syntax.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)