protected function getPathSpec($host, $user, $path) { $spec = isset($path) ? $path : ''; if (!empty($host)) { $spec = "{$host}:{$spec}"; } if (!empty($user)) { $spec = "{$user}@{$spec}"; } return $spec; }