コード例 #1
0
ファイル: Method.php プロジェクト: idwsdta/INIT-frame
 public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array())
 {
     $options['callable'] = array($extension, $method);
     parent::__construct($options);
     $this->extension = $extension;
     $this->method = $method;
 }
コード例 #2
0
ファイル: Node.php プロジェクト: DeDoOozZz/brighterycms
 public function __construct($class, array $options = [])
 {
     parent::__construct($options);
     $this->class = $class;
 }
コード例 #3
0
ファイル: Staging.php プロジェクト: rvanlaak/Twig
 public function addTest(Twig_Test $test)
 {
     $this->tests[$test->getName()] = $test;
 }
コード例 #4
0
ファイル: Environment.php プロジェクト: robregonm/Twig
 /**
  * Registers a Test.
  *
  * @param Twig_Test $test A Twig_Test instance
  */
 public function addTest(Twig_Test $test)
 {
     if ($this->extensionInitialized) {
         throw new LogicException(sprintf('Unable to add test "%s" as extensions have already been initialized.', $test->getName()));
     }
     $this->staging->addTest($test);
 }
コード例 #5
0
 public function __construct($function, array $options = array())
 {
     $options['callable'] = $function;
     parent::__construct($options);
     $this->function = $function;
 }