A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Tag Archives: object oriented

A Basic Python Class

This is the basic structure of a Python class. >>> class Simplex: … "An example class""" … def __init__(self, x, y): … self.a = x … self.b = y … def addition(self): … return self.a + self.b … >>> z … Continue reading

Posted in General | Tagged , , , | 1 Comment

PHP: Using variables for calling object properties

I had a scenario at work today that need me to use a variable in an object and call it like I would when using keys in an array. Like when I have an array, I would do something like … Continue reading

Posted in General | Tagged , , , | 5 Comments