2013-08-04 18:58:31 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2014-01-28 09:36:04 +00:00
|
|
|
* wallabag, self hostable application allowing you to not miss any content anymore
|
2013-08-04 18:58:31 +00:00
|
|
|
*
|
2014-01-28 09:36:04 +00:00
|
|
|
* @category wallabag
|
|
|
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
2013-08-04 18:58:31 +00:00
|
|
|
* @copyright 2013
|
2014-07-11 14:03:59 +00:00
|
|
|
* @license http://opensource.org/licenses/MIT see COPYING file
|
2013-08-04 18:58:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class Url
|
|
|
|
{
|
|
|
|
public $url;
|
|
|
|
|
|
|
|
function __construct($url)
|
|
|
|
{
|
|
|
|
$this->url = base64_decode($url);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getUrl() {
|
|
|
|
return $this->url;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setUrl($url) {
|
|
|
|
$this->url = $url;
|
|
|
|
}
|
|
|
|
|
2013-08-25 18:10:23 +00:00
|
|
|
public function isCorrect() {
|
2013-08-24 14:50:28 +00:00
|
|
|
return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE;
|
2013-08-04 18:58:31 +00:00
|
|
|
}
|
|
|
|
}
|