Date post: | 17-Jul-2015 |
Category: |
Technology |
Upload: | david-stockton |
View: | 142 times |
Download: | 1 times |
David Stockton VP of Technology, i3logix Denver, CO
Coding in PHP for over 17 years Organizer of the Front Range PHP User Group for 5 years Board of Directors, Front Range Web Developer Assoc.
@dstockto http://davidstockton.com http://tddftw.com https://www.youtube.com/user/dstockto/videos
#phpmentoring #phpstudygroup
What we’ll talk about• Classes
• Objects
• Interfaces
• Inheritance
• Methods
• Properties
• Visibility Modifiers
• Static
• Constructors
Why bother with OOP?
Functions are global and not related to structures
Problems with Procedural Code
Constructor
One of PHP’s “magic” methods
__construct
Used to initialize the properties of the object
Protected
Property or method available within the class or class’s inheritance structure (both ways)
Static
Method or class available at Class level, no object needed
Changes affect all instances of the class