PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Protected Member Functions
Twig_Node_SandboxedPrint Class Reference

Twig_Node_SandboxedPrint adds a check for the __toString() method when the variable is an object and the sandbox is activated. More...

Inheritance diagram for Twig_Node_SandboxedPrint:
Twig_Node_Print Twig_Node Twig_NodeOutputInterface Twig_NodeInterface

Public Member Functions

 __construct (Twig_Node_Expression $expr, $lineno, $tag=null)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
- Public Member Functions inherited from Twig_Node_Print
 __construct (Twig_Node_Expression $expr, $lineno, $tag=null)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
- Public Member Functions inherited from Twig_Node
 __construct (array $nodes=array(), array $attributes=array(), $lineno=0, $tag=null)
 Constructor. More...
 
 __toString ()
 
 toXml ($asDom=false)
 
 compile (Twig_Compiler $compiler)
 Compiles the node to PHP. More...
 
 getLine ()
 
 getNodeTag ()
 
 hasAttribute ($name)
 Returns true if the attribute is defined. More...
 
 getAttribute ($name)
 Gets an attribute. More...
 
 setAttribute ($name, $value)
 Sets an attribute. More...
 
 removeAttribute ($name)
 Removes an attribute. More...
 
 hasNode ($name)
 Returns true if the node with the given identifier exists. More...
 
 getNode ($name)
 Gets a node by name. More...
 
 setNode ($name, $node=null)
 Sets a node. More...
 
 removeNode ($name)
 Removes a node by name. More...
 
 count ()
 
 getIterator ()
 

Protected Member Functions

 removeNodeFilter ($node)
 Removes node filters. More...
 

Additional Inherited Members

- Protected Attributes inherited from Twig_Node
 $nodes
 
 $attributes
 
 $lineno
 
 $tag
 

Detailed Description

Twig_Node_SandboxedPrint adds a check for the __toString() method when the variable is an object and the sandbox is activated.

When there is a simple Print statement, like {{ article }}, and if the sandbox is enabled, we need to check that the __toString() method is allowed if 'article' is an object.

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

Definition at line 22 of file SandboxedPrint.php.

Constructor & Destructor Documentation

__construct ( Twig_Node_Expression  $expr,
  $lineno,
  $tag = null 
)

Definition at line 24 of file SandboxedPrint.php.

Member Function Documentation

compile ( Twig_Compiler  $compiler)

Compiles the node to PHP.

Parameters
Twig_CompilerA Twig_Compiler instance

Implements Twig_NodeInterface.

Definition at line 34 of file SandboxedPrint.php.

removeNodeFilter (   $node)
protected

Removes node filters.

This is mostly needed when another visitor adds filters (like the escaper one).

Parameters
Twig_Node$nodeA Node

Definition at line 51 of file SandboxedPrint.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:45 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.