id = $id; $this->user = $user; $this->remote = $remote; $this->displayName = $displayName; } /** * The full remote cloud id * * @return string */ public function getId(): string { return $this->id; } public function getDisplayId(): string { if ($this->displayName) { $atPos = strrpos($this->getId(), '@'); $atHost = substr($this->getId(), $atPos); return $this->displayName . $atHost; } return str_replace('https://', '', str_replace('http://', '', $this->getId())); } /** * The username on the remote server * * @return string */ public function getUser(): string { return $this->user; } /** * The base address of the remote server * * @return string */ public function getRemote(): string { return $this->remote; } }