PHP magic methods (Introduction) and php magic methods
Public void _ set (string $ name, mixed $ value)
Public mixed _ get (string $ name)
Public bool _ isset (string $ name)
Public void _ unset (string $ name)
Public mixed _ call (string $ name, array $ arguments)
The functions of these methods are as follows:
_ Set (string $ name, mixed $ value): this parameter is called when an object assigns values to undefined or invisible attributes. Parameter name is the attribute to be assigned, value is the value to be assigned to the attribute.
_ Get (string $ name): it is called when an object is accessed with undefined or invisible attributes. The parameter name is the name of the attribute to be accessed.
_ Isset (string $ name): isset () is called when undefined or invisible attributes are used. The parameter name is the attribute name.
_ Unset (string $ name): The parameter name is called when unset () is used for undefined or invisible attributes.
_ Call (string $ name, array $ arguments): this parameter is called when an undefined or invisible method is called. The parameter name is the method name, the arguments parameter is an array composed of parameters to be passed to the method.
Note: The role of these pattern methods is to intercept operations on non-existent object members, and then respond to them accordingly. All these methods must be modified using public.