mirror of
https://github.com/wallabag/wallabag.git
synced 2024-06-11 17:59:26 +00:00
29 lines
427 B
PHP
29 lines
427 B
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\Helper;
|
|
|
|
class Url
|
|
{
|
|
public $url;
|
|
|
|
public function __construct($url)
|
|
{
|
|
$this->url = base64_decode($url);
|
|
}
|
|
|
|
public function getUrl()
|
|
{
|
|
return $this->url;
|
|
}
|
|
|
|
public function setUrl($url)
|
|
{
|
|
$this->url = $url;
|
|
}
|
|
|
|
public function isCorrect()
|
|
{
|
|
return filter_var($this->url, FILTER_VALIDATE_URL) !== false;
|
|
}
|
|
}
|