]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | /** | |
3 | * poche, a read it later open source system | |
4 | * | |
5 | * @category poche | |
6 | * @author Nicolas LÅ“uillet <support@inthepoche.com> | |
7 | * @copyright 2013 | |
8 | * @license http://www.wtfpl.net/ see COPYING file | |
9 | */ | |
10 | ||
11 | class Url | |
12 | { | |
13 | public $url; | |
14 | ||
15 | function __construct($url) | |
16 | { | |
17 | $this->url = base64_decode($url); | |
18 | } | |
19 | ||
20 | public function getUrl() { | |
21 | return $this->url; | |
22 | } | |
23 | ||
24 | public function setUrl($url) { | |
25 | $this->url = $url; | |
26 | } | |
27 | ||
28 | public function isCorrect() { | |
29 | return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE; | |
30 | } | |
31 | } |