diff options
Diffstat (limited to 'src/Wallabag/Wallabag/Url.php')
-rw-r--r-- | src/Wallabag/Wallabag/Url.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Wallabag/Wallabag/Url.php b/src/Wallabag/Wallabag/Url.php new file mode 100644 index 00000000..b18fe3d4 --- /dev/null +++ b/src/Wallabag/Wallabag/Url.php | |||
@@ -0,0 +1,33 @@ | |||
1 | <?php | ||
2 | /** | ||
3 | * wallabag, self hostable application allowing you to not miss any content anymore | ||
4 | * | ||
5 | * @category wallabag | ||
6 | * @author Nicolas LÅ“uillet <nicolas@loeuillet.org> | ||
7 | * @copyright 2013 | ||
8 | * @license http://opensource.org/licenses/MIT see COPYING file | ||
9 | */ | ||
10 | |||
11 | namespace Wallabag\Wallabag; | ||
12 | |||
13 | class Url | ||
14 | { | ||
15 | public $url; | ||
16 | |||
17 | function __construct($url) | ||
18 | { | ||
19 | $this->url = base64_decode($url); | ||
20 | } | ||
21 | |||
22 | public function getUrl() { | ||
23 | return $this->url; | ||
24 | } | ||
25 | |||
26 | public function setUrl($url) { | ||
27 | $this->url = $url; | ||
28 | } | ||
29 | |||
30 | public function isCorrect() { | ||
31 | return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE; | ||
32 | } | ||
33 | } \ No newline at end of file | ||