ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_Markup Class Reference

Marks a content as safe. More...

+ Inheritance diagram for Twig_Markup:
+ Collaboration diagram for Twig_Markup:

Public Member Functions

 __construct ($content, $charset)
 
 __toString ()
 
 count ()
 

Protected Attributes

 $content
 
 $charset
 

Detailed Description

Marks a content as safe.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file Markup.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Markup::__construct (   $content,
  $charset 
)

Definition at line 22 of file Markup.php.

23 {
24 $this->content = (string) $content;
25 $this->charset = $charset;
26 }

References $charset, and $content.

Member Function Documentation

◆ __toString()

Twig_Markup::__toString ( )

Definition at line 28 of file Markup.php.

29 {
30 return $this->content;
31 }

References $content.

◆ count()

Twig_Markup::count ( )

Definition at line 33 of file Markup.php.

34 {
35 return function_exists('mb_get_info') ? mb_strlen($this->content, $this->charset) : strlen($this->content);
36 }

Field Documentation

◆ $charset

Twig_Markup::$charset
protected

Definition at line 20 of file Markup.php.

Referenced by __construct().

◆ $content

Twig_Markup::$content
protected

Definition at line 19 of file Markup.php.

Referenced by __construct(), and __toString().


The documentation for this class was generated from the following file: