1: Object-oriented features:
(1): Abstract
(2): encapsulation
(3): Sharing
(4): Emphasizing object structure and not dying program structure
2: Three main features of object-oriented ( encapsulation, inheritance, polymorphism ) indispensable
Encapsulation: is to encapsulate similar content into a class
Inheritance: The inheritance of family possessions
Polymorphic: Run-time loading
3: Initialize object:__construct (); The function will run automatically when the object is initialized
Note : __ (This is two slide, be sure not to hit a yo)
If the initialization has parameters, the output must be followed by the
4: Package keyword: public,protected,private
Public: It is public.
5: Encapsulate related functions: __set (), __get ()
__set (): Gets the current class that encapsulates a private property or method re-execution or assignment operation
__get (): Gets the property or method encapsulated in the current class and converted to a common property
6: $this keyword in an object
$this keyword is a system variable that is used to access object properties and Object methods in the current object