Here is the code:
$user = VK::getUser($userID); $this->id = $user->id; // $this - объект того же класса, что и $user $this->name = $user->name; // и так далее... Here is the code:
$user = VK::getUser($userID); $this->id = $user->id; // $this - объект того же класса, что и $user $this->name = $user->name; // и так далее... Source: https://ru.stackoverflow.com/questions/587049/
All Articles
clonedesign not please you with? - Dmitriy Simushev$thisan object of the same class as$user, then you need to clone$userat a higher level and only then work with it. Although you need to be sure that cloning works correctly on objects of type$user. - Dmitriy Simushevcloneis not a function, and secondly, this action should be carried out at a higher level (and not in the scope of the class methods). - Dmitriy Simushev