PEEL Shopping
Open source ecommerce : PEEL Shopping
Filter.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 2009 Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
21 {
22  protected $options;
23  protected $arguments = array();
24 
25  public function __construct(array $options = array())
26  {
27  $this->options = array_merge(array(
28  'needs_environment' => false,
29  'needs_context' => false,
30  'pre_escape' => null,
31  'preserves_safety' => null,
32  'callable' => null,
33  ), $options);
34  }
35 
36  public function setArguments($arguments)
37  {
38  $this->arguments = $arguments;
39  }
40 
41  public function getArguments()
42  {
43  return $this->arguments;
44  }
45 
46  public function needsEnvironment()
47  {
48  return $this->options['needs_environment'];
49  }
50 
51  public function needsContext()
52  {
53  return $this->options['needs_context'];
54  }
55 
56  public function getSafe(Twig_Node $filterArgs)
57  {
58  if (isset($this->options['is_safe'])) {
59  return $this->options['is_safe'];
60  }
61 
62  if (isset($this->options['is_safe_callback'])) {
63  return call_user_func($this->options['is_safe_callback'], $filterArgs);
64  }
65  }
66 
67  public function getPreservesSafety()
68  {
69  return $this->options['preserves_safety'];
70  }
71 
72  public function getPreEscape()
73  {
74  return $this->options['pre_escape'];
75  }
76 
77  public function getCallable()
78  {
79  return $this->options['callable'];
80  }
81 }
__construct(array $options=array())
Definition: Filter.php:25
getCallable()
Definition: Filter.php:77
getPreservesSafety()
Definition: Filter.php:67
needsEnvironment()
Definition: Filter.php:46
Represents a template filter.
Definition: Filter.php:20
Represents a node in the AST.
Definition: Node.php:18
getSafe(Twig_Node $filterArgs)
Definition: Filter.php:56
getArguments()
Definition: Filter.php:41
setArguments($arguments)
Definition: Filter.php:36
Represents a template filter.
getPreEscape()
Definition: Filter.php:72
needsContext()
Definition: Filter.php:51
Represents a callable template filter.

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