PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Protected Member Functions | Protected Attributes
Twig_Extension_Core Class Reference
Inheritance diagram for Twig_Extension_Core:
Twig_Extension Twig_ExtensionInterface

Public Member Functions

 setDateFormat ($format=null, $dateIntervalFormat=null)
 Sets the default format to be used by the date filter. More...
 
 getDateFormat ()
 Gets the default format to be used by the date filter. More...
 
 setTimezone ($timezone)
 Sets the default timezone to be used by the date filter. More...
 
 getTimezone ()
 Gets the default timezone to be used by the date filter. More...
 
 setNumberFormat ($decimal, $decimalPoint, $thousandSep)
 Sets the default format to be used by the number_format filter. More...
 
 getNumberFormat ()
 Get the default format used by the number_format filter. More...
 
 getTokenParsers ()
 Returns the token parser instance to add to the existing list. More...
 
 getFilters ()
 Returns a list of filters to add to the existing list. More...
 
 getFunctions ()
 Returns a list of global functions to add to the existing list. More...
 
 getTests ()
 Returns a list of tests to add to the existing list. More...
 
 getOperators ()
 Returns a list of operators to add to the existing list. More...
 
 parseNotTestExpression (Twig_Parser $parser, $node)
 
 parseTestExpression (Twig_Parser $parser, $node)
 
 getName ()
 Returns the name of the extension. More...
 
- Public Member Functions inherited from Twig_Extension
 initRuntime (Twig_Environment $environment)
 Initializes the runtime environment. More...
 
 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 ()
 Returns a list of global variables to add to the existing list. More...
 

Protected Member Functions

 getTestNodeClass (Twig_Parser $parser, $name, $line)
 

Protected Attributes

 $dateFormats = array('F j, Y H:i', '%d days')
 
 $numberFormat = array(0, '.', ',')
 
 $timezone = null
 

Detailed Description

Definition at line 15 of file Core.php.

Member Function Documentation

getDateFormat ( )

Gets the default format to be used by the date filter.

Returns
array The default date format string and the default date interval format string

Definition at line 43 of file Core.php.

getFilters ( )

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

Returns
array An array of filters

Implements Twig_ExtensionInterface.

Definition at line 125 of file Core.php.

getFunctions ( )

Returns a list of global functions to add to the existing list.

Returns
array An array of global functions

Implements Twig_ExtensionInterface.

Definition at line 186 of file Core.php.

getName ( )

Returns the name of the extension.

Returns
string The extension name

Implements Twig_ExtensionInterface.

Definition at line 305 of file Core.php.

getNumberFormat ( )

Get the default format used by the number_format filter.

Returns
array The arguments for number_format()

Definition at line 89 of file Core.php.

getOperators ( )

Returns a list of operators to add to the existing list.

Returns
array An array of operators

Implements Twig_ExtensionInterface.

Definition at line 224 of file Core.php.

getTestNodeClass ( Twig_Parser  $parser,
  $name,
  $line 
)
protected

Definition at line 280 of file Core.php.

getTests ( )

Returns a list of tests to add to the existing list.

Returns
array An array of tests

Implements Twig_ExtensionInterface.

Definition at line 203 of file Core.php.

getTimezone ( )

Gets the default timezone to be used by the date filter.

Returns
DateTimeZone The default timezone currently in use

Definition at line 63 of file Core.php.

getTokenParsers ( )

Returns the token parser instance to add to the existing list.

Returns
array An array of Twig_TokenParser instances

Implements Twig_ExtensionInterface.

Definition at line 99 of file Core.php.

parseNotTestExpression ( Twig_Parser  $parser,
  $node 
)

Definition at line 261 of file Core.php.

parseTestExpression ( Twig_Parser  $parser,
  $node 
)

Definition at line 266 of file Core.php.

setDateFormat (   $format = null,
  $dateIntervalFormat = null 
)

Sets the default format to be used by the date filter.

Parameters
string$formatThe default date format string
string$dateIntervalFormatThe default date interval format string

Definition at line 27 of file Core.php.

setNumberFormat (   $decimal,
  $decimalPoint,
  $thousandSep 
)

Sets the default format to be used by the number_format filter.

Parameters
integer$decimalThe number of decimal places to use.
string$decimalPointThe character(s) to use for the decimal point.
string$thousandSepThe character(s) to use for the thousands separator.

Definition at line 79 of file Core.php.

setTimezone (   $timezone)

Sets the default timezone to be used by the date filter.

Parameters
DateTimeZone | string$timezoneThe default timezone string or a DateTimeZone object

Definition at line 53 of file Core.php.

Field Documentation

$dateFormats = array('F j, Y H:i', '%d days')
protected

Definition at line 17 of file Core.php.

$numberFormat = array(0, '.', ',')
protected

Definition at line 18 of file Core.php.

$timezone = null
protected

Definition at line 19 of file Core.php.


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

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:44 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.