public function getUrl() { if ($this->server_name) { return 'http://' . $this->server_name; } return \Yii::$app->request->hostInfo; }