auth(); } /** * Метод авторизации робота * * @return void */ public function auth(string $token, float $version) { if ($token instanceof auth) { $this->auth = $token; $this->version = $version; $this->token = $this->auth->getAccessToken(); } else if (isset($also_version)) { $this->auth = new Auth($token, $version); $this->token = $this->auth->getAccessToken(); $this->version = $also_version; } else { $this->token = $token; $this->version = $version; } $this->data = json_decode(file_get_contents('php://input')); } }