@@ 54-57 (lines=4) @@ | ||
51 | */ |
|
52 | public function __construct($url = '') |
|
53 | { |
|
54 | if ('' != $url && false === filter_var($url, FILTER_VALIDATE_URL)) |
|
55 | { |
|
56 | throw new UrlException(sprintf('Invalid URL! (%s)', $url)); |
|
57 | } |
|
58 | ||
59 | $this->parseUrlString($url); |
|
60 | } |
|
@@ 482-487 (lines=6) @@ | ||
479 | $url = sprintf('%s#%s', $url, $this->getFragment()); |
|
480 | } |
|
481 | ||
482 | if (false === filter_var($url, FILTER_VALIDATE_URL)) |
|
483 | { |
|
484 | throw new UrlException(sprintf('URL composition error! Please check your data. ' . |
|
485 | 'The composition result is an invalid URL: "%s"', |
|
486 | $url)); |
|
487 | } |
|
488 | ||
489 | return $url; |
|
490 | } |