2013-08-04 18:58:31 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* poche, a read it later open source system
|
|
|
|
*
|
|
|
|
* @category poche
|
|
|
|
* @author Nicolas Lœuillet <support@inthepoche.com>
|
|
|
|
* @copyright 2013
|
|
|
|
* @license http://www.wtfpl.net/ see COPYING file
|
|
|
|
*/
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|