Chapter One Summary
In this chapter of the course, you'll learn about Object-oriented Programming (OOPHP). OOPHP encompasses a lot of concepts that will help you write code more efficiently and reliably, such as creating classes, defining properties & methods, using parameters & arguments, writing constructors, type declarations & hints, and promoted properties. Here's an overview of each concept to help you get started:
- Classes: Used to create & define objects
- Properties: Variables that belong to the object
- Methods: Function used to add functionality to the object
- Parameters & Arguments: Variables used when defining methods or passing data to the object
- Constructors: Special type of Method called behind-the-scenes when an object is created
- Type Declarations & Hints: Used to keep code consistent & predictable
- Promoted Properties: Streamlines code needed to set property values in the constructor