ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_Extensions_Extension_Intl Class Reference
+ Inheritance diagram for Twig_Extensions_Extension_Intl:
+ Collaboration diagram for Twig_Extensions_Extension_Intl:

Public Member Functions

 __construct ()
 
 getFilters ()
 {Returns a list of filters to add to the existing list.
Returns
Twig_SimpleFilter[]
} More...
 
 getName ()
 {Returns the name of the extension.
Returns
string The extension name
Deprecated:
since 1.26 (to be removed in 2.0), not used anymore internally
} More...
 
- Public Member Functions inherited from Twig_Extension
 initRuntime (Twig_Environment $environment)
 
 getTokenParsers ()
 Returns the token parser instances to add to the existing list. More...
 
 getNodeVisitors ()
 Returns the node visitor instances to add to the existing list. More...
 
 getFilters ()
 Returns a list of filters to add to the existing list. More...
 
 getTests ()
 Returns a list of tests to add to the existing list. More...
 
 getFunctions ()
 Returns a list of functions to add to the existing list. More...
 
 getOperators ()
 Returns a list of operators to add to the existing list. More...
 
 getGlobals ()
 
 getName ()
 

Detailed Description

Definition at line 12 of file Intl.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Extensions_Extension_Intl::__construct ( )

Definition at line 14 of file Intl.php.

15  {
16  if (!class_exists('IntlDateFormatter')) {
17  throw new RuntimeException('The intl extension is needed to use intl-based filters.');
18  }
19  }

Member Function Documentation

◆ getFilters()

Twig_Extensions_Extension_Intl::getFilters ( )

{Returns a list of filters to add to the existing list.

Returns
Twig_SimpleFilter[]
}

Implements Twig_ExtensionInterface.

Definition at line 24 of file Intl.php.

25  {
26  return array(
27  new Twig_SimpleFilter('localizeddate', 'twig_localized_date_filter', array('needs_environment' => true)),
28  new Twig_SimpleFilter('localizednumber', 'twig_localized_number_filter'),
29  new Twig_SimpleFilter('localizedcurrency', 'twig_localized_currency_filter'),
30  );
31  }
Represents a template filter.

◆ getName()

Twig_Extensions_Extension_Intl::getName ( )

{Returns the name of the extension.

Returns
string The extension name
Deprecated:
since 1.26 (to be removed in 2.0), not used anymore internally
}

Implements Twig_ExtensionInterface.

Definition at line 36 of file Intl.php.

37  {
38  return 'intl';
39  }

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