PEEL Shopping
Open source ecommerce : PEEL Shopping
Method.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 $extension;
23  protected $method;
24 
25  public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array())
26  {
27  $options['callable'] = array($extension, $method);
28 
29  parent::__construct($options);
30 
31  $this->extension = $extension;
32  $this->method = $method;
33  }
34 
35  public function compile()
36  {
37  return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method);
38  }
39 }
__construct(Twig_ExtensionInterface $extension, $method, array $options=array())
Definition: Method.php:25
Represents a template filter.
Definition: Filter.php:20
compile()
Compiles a filter.
Definition: Method.php:35
Interface implemented by extension classes.
Represents a method template filter.
Definition: Method.php:20

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.