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

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.