diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-12 21:16:00 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-12 21:16:00 +0200 |
commit | c2257428b2188fc709c76ec8f531287888de9741 (patch) | |
tree | 92c6dbc5f3027f0f8be9f21433bf678a4c6c2954 /src/Wallabag/CoreBundle/Twig | |
parent | d990dc6f0535cad745929ca90d1e4bb00ba47584 (diff) | |
download | wallabag-c2257428b2188fc709c76ec8f531287888de9741.tar.gz wallabag-c2257428b2188fc709c76ec8f531287888de9741.tar.zst wallabag-c2257428b2188fc709c76ec8f531287888de9741.zip |
store domainName in database
Diffstat (limited to 'src/Wallabag/CoreBundle/Twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php deleted file mode 100644 index 5f0a9643..00000000 --- a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Twig\Extension; | ||
4 | |||
5 | class WallabagExtension extends \Twig_Extension | ||
6 | { | ||
7 | public function getFilters() | ||
8 | { | ||
9 | return array( | ||
10 | new \Twig_SimpleFilter('domainName', array($this, 'getDomainName')), | ||
11 | ); | ||
12 | } | ||
13 | |||
14 | /** | ||
15 | * Returns the domain name for a URL. | ||
16 | * | ||
17 | * @param $url | ||
18 | * | ||
19 | * @return string | ||
20 | */ | ||
21 | public static function getDomainName($url) | ||
22 | { | ||
23 | return parse_url($url, PHP_URL_HOST); | ||
24 | } | ||
25 | |||
26 | public function getName() | ||
27 | { | ||
28 | return 'wallabag_extension'; | ||
29 | } | ||
30 | } | ||