Although I know that Oauth2::getMyopenid() is a method to obtain the user's openid, I would like to ask if getMyopenid() is a fixed usage?
Also, is the "::" double colon a fixed way of writing or does it have other meanings? Want to know what is happening and why. Thank you for your trouble.
Although I know that Oauth2::getMyopenid() is a method to obtain the user's openid, I would like to ask if getMyopenid() is a fixed usage?
Also, is the "::" double colon a fixed way of writing or does it have other meanings? Want to know what is happening and why. Thank you for your trouble.
getMyopenid() is a method name, a method name in the Oauth2 class. You can understand it as a fixed usage. It can be processed according to the different parameters you pass in and return to you the corresponding openid
The double colon means that this is a static method and needs to be used like this. If it is not static, use -> the arrow points to it
The scope resolution operator (also known as Paamayim Nekudotayim) or more simply a pair of colons can be used to access static members, class constants, and can also be used to override properties and methods in a class.
Nothing is better than the official explanation
http://php.net/manual/zh/lang...