Pribably it will be better to save $this->wg->request as a variable.