From 8069e235fd2971675ee5fc05026ffa9bce5cbbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 2 Aug 2013 22:43:56 +0200 Subject: move Twig in 3rdparty --- inc/3rdparty/Twig/Markup.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 inc/3rdparty/Twig/Markup.php (limited to 'inc/3rdparty/Twig/Markup.php') diff --git a/inc/3rdparty/Twig/Markup.php b/inc/3rdparty/Twig/Markup.php new file mode 100644 index 00000000..69871fcb --- /dev/null +++ b/inc/3rdparty/Twig/Markup.php @@ -0,0 +1,37 @@ + + */ +class Twig_Markup implements Countable +{ + protected $content; + protected $charset; + + public function __construct($content, $charset) + { + $this->content = (string) $content; + $this->charset = $charset; + } + + public function __toString() + { + return $this->content; + } + + public function count() + { + return function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : strlen($this->content); + } +} -- cgit v1.2.3