02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ OBJECT-ORIENTED PROGRAMMING<br />

■ Note OOP allows objects to reference themselves using $this. When working within a method, use $this in<br />

the same way you would use the object name outside the class.<br />

To use these methods, call them just like regular functions, but first, reference the object to which<br />

they belong. Read the property from MyClass, change its value, <strong>and</strong> read it out again <strong>by</strong> making the<br />

modifications shown in bold:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!