/** * Create and return a (possibly sanitized and resolved) URL manipulation object * * @param \string $url Original URL * @param \boolean $sanitize Sanitize URL * @param \string|\Jkphl\Utility\Url $resolve URL (string or object) to resolve the new one against * @return \Jkphl\Utility\Url URL manipulation object */ public static function instance($url, $sanitize = false, $resolve = null) { $instance = new self($url, $sanitize); if ($resolve !== null) { $instance->absolutize($resolve instanceof self ? $resolve : self::instance($resolve, true)); } return $instance; }