| 1 | <?php |
||
| 7 | class Url |
||
| 8 | { |
||
| 9 | use EnsureIsStringTrait; |
||
| 10 | use EnsureIsUrlTrait; |
||
| 11 | |||
| 12 | const URL_IS_NOT_A_STRING = 1; |
||
| 13 | const URL_IS_NOT_A_URL = 2; |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $url; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $url |
||
| 21 | */ |
||
| 22 | public function __construct($url) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function asString() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param $url |
||
| 39 | */ |
||
| 40 | private function ensureUrl($url) |
||
| 45 | } |
||
| 46 |