enable() public static méthode

Extensions provide additional features to QueryPath. To enable and extension, you can use this method. In this example, we enable the QPTPL extension:
public static enable ( mixed $extensionNames )
$extensionNames mixed The name of an extension or an array of extension names. QueryPath assumes that these are extension class names, and attempts to register these as QueryPath extensions.
<?php

/*
 * Demo of UI interaction with jQuery+Uniter
 *
 * MIT license.
 */
$autoloader = (require __DIR__ . '/../../vendor/autoload.php');
$autoloader->add('Demo\\Tests\\', __DIR__);
QueryPath::enable('Demo\\QueryPath\\Extension\\DomEventExtension');
QueryPath::enable('Demo\\QueryPath\\Extension\\DomDataExtension');
Exemple #2
0
 public static function setUpBeforeClass()
 {
     \QueryPath::enable('\\QueryPath\\Extension\\QPList');
 }
Exemple #3
0
 public function testEnable()
 {
     \QueryPath::enable('\\QueryPath\\Tests\\DummyExtension');
     $qp = \QueryPath::with(\QueryPath::XHTML_STUB);
     $this->assertTrue($qp->grrrrrrr());
 }