1. Object-Oriented Overview:
oo Programming (Object Oriented programming, or oop)
Object-oriented uses a completely different approach to the development of computer applications. This approach is designed around the objects in the problem to be solved.
The object model is established and the problem is scoped to different objects for processing.
2. main Three properties of the object:
- Object behavior: You can apply those actions to objects, turn on the lights, turn off the lights is the behavior.
- The shape of the object: When applying those methods is how the object responds, color, size, shape.
- Object representation: The representation of an object is equivalent to an identity card, specifically distinguishing between the same behavior and the state of what is different.
3. relationship of classes and objects
A class is an abstraction of an object that is an instance of a class
A class is a collection of sets of objects that have the same properties and behavior.
4. Create a class
PHP uses the keyword class to define a class. Class naming is typically capitalized with the first character
PHP Object-oriented