Mimicking Python Descriptors in PHP
So you’ve been working in Python for a year and then along comes a PHP gig that you just can’t pass up. All of a sudden you’re realizing just how much you miss some of the familiar Pythonisms you’ve come to rely on. One such feature that is lacking in PHP is the concept of descriptors. Fortunately, it’s possible to pretty closely simulate their behaviour in PHP with just a few special interfaces and classes.
January 15th 2010
6:55 pm
by: xdissent
0 Comments
descriptors, OOP