This course focuses training on the class, trait, interface constructs, and object use cases both conceptually, and with application use cases. The student will learn techniques for code reuse and organization, how to build relationships of like functionality and leverage the power of PHP's object-oriented model.
Daryl Wood is a certified software engineer and architect, web technology consultant, instructor, and author. He is the CTO of Datashuttle.net, Inc., a web services company. He has authored training content in WAMP and MAMP servers, Linux Mint, and Apache mod_rewrite. He gets a kick out of working with students and software engineers, they are the coolest people he says.
Method Overriding and Overloading Hello and welcome to Object-oriented PHP, Method Overriding and Overloading. My name Is Daryl and my contact information is on the screen. In this module is some pure magic, at last as far as the automatic method calling is magic. The first part of this module covers method overloading as it pertains to the inheritance model, then I go forward with method overloading and how PHP manages that with magic methods, then a closer look at the other magic methods offered by PHP and what you can do with them. As mentioned, they are magic so let's see how that works. Glad to have you along.
PHP Traits and Class Relationship Hello and welcome to Object-Oriented PHP. My name is Daryl, and my contact information is on the screen. In this module is an interesting PHP construct, the trait. The first part of this module covers the trait construct and how traits are used in classes and why. Then we cover some of the issues with traits or at least a few things to keep in mind if you choose to use them. A later clip covers trait visibilities and how the visibility can be loosened or tightened unlike anything else in PHP object-oriented programming. Still later, we show how trait multiples are used and how to build trait inheritance. So traits are really interesting, similar to other object-oriented constructs but very unique in their use and functionality with a little weirdness thrown in. Coming up, let's have some fun with the PHP trait. Now in object-oriented PHP.
Class Abstraction, Interface, and Type Hints Hello and welcome to Object Oriented PHP. My name is Daryl and my contact information is on the screen. In this module are a few of the more complex parts of PHP to wrap your head around. The abstract class and method, the interface construct and type hinting. The first part covers class and method abstraction and when either of those techniques are appropriate. The middle part of the module deals with interfaces, how and why they are necessary and some pretty specific examples. Then we move to type hinting where type hinting of scalar types are addressed and the uses of a raise in interfaces as type hints. Then I show concrete examples of type hinting with interfaces and how that technique is used to streamline our code and make it more testable. It's pretty cool stuff, but will bend your brain a little. So get ready for abstract classes, interfaces and type hints in our code, coming up next. Great to have you all along.