forked from wallabag/wallabag
replace legacy calls with new one
This commit is contained in:
25
src/Wallabag/CoreBundle/Helper/Url.php
Normal file
25
src/Wallabag/CoreBundle/Helper/Url.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Helper;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public function isCorrect() {
|
||||
return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user