aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/Url.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/Url.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/Url.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/Url.php b/src/Wallabag/CoreBundle/Helper/Url.php
new file mode 100644
index 00000000..b076e7c7
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Helper/Url.php
@@ -0,0 +1,25 @@
1<?php
2
3namespace Wallabag\CoreBundle\Helper;
4
5class Url
6{
7 public $url;
8
9 function __construct($url)
10 {
11 $this->url = base64_decode($url);
12 }
13
14 public function getUrl() {
15 return $this->url;
16 }
17
18 public function setUrl($url) {
19 $this->url = $url;
20 }
21
22 public function isCorrect() {
23 return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE;
24 }
25} \ No newline at end of file