/** * @see \Components\Cloneable::__clone() __clone */ public function __clone() { $url = new self(); $url->m_scheme = $this->m_scheme; $url->m_host = $this->m_host; $url->m_port = $this->m_port; $url->m_username = $this->m_username; $url->m_password = $this->m_password; // clone arrays? $url->setPathParams($this->getPathParams()); $url->setQueryParams($this->getQueryParams()); $url->m_fragment = $this->m_fragment; if (null !== $this->m_options) { $url->m_options = Bitmask::forBitmask($this->m_options->toBitmask()); } return $url; }