public function defaultPort($port = null)
    {
        if (!is_null($port)) {
            $this->defaultPort = (int)$port;
            if ($this->url['port'] === null) {
                $this->url['port'] = $this->defaultPort;
            }
        }

        return $this->defaultPort;
    }