diff options
author | Alexandr Danilov <bitbucket@modos189.ru> | 2015-08-12 23:02:19 +0300 |
---|---|---|
committer | Alexandr Danilov <bitbucket@modos189.ru> | 2015-08-12 23:02:19 +0300 |
commit | a737d2a0eeb23588fd8659471c41df0a6b95705a (patch) | |
tree | 1a8ca25a33a6f5fb19445a9bf5c753aa9a22b9c9 /src/Wallabag/CoreBundle/Twig/Extension | |
parent | 392f4a2681d94b8af8e2725aa6ca4615329afa54 (diff) | |
parent | 545b852f4694d1d9821bb4d13d6a1f3e0e7634fb (diff) | |
download | wallabag-a737d2a0eeb23588fd8659471c41df0a6b95705a.tar.gz wallabag-a737d2a0eeb23588fd8659471c41df0a6b95705a.tar.zst wallabag-a737d2a0eeb23588fd8659471c41df0a6b95705a.zip |
Merge remote-tracking branch 'origin/v2' into v2_material
Diffstat (limited to 'src/Wallabag/CoreBundle/Twig/Extension')
-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 | } | ||