enable() public static method

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.
Exemplo n.º 1
0
<?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');
Exemplo n.º 2
0
 public static function setUpBeforeClass()
 {
     \QueryPath::enable('\\QueryPath\\Extension\\QPList');
 }
Exemplo n.º 3
0
 public function testEnable()
 {
     \QueryPath::enable('\\QueryPath\\Tests\\DummyExtension');
     $qp = \QueryPath::with(\QueryPath::XHTML_STUB);
     $this->assertTrue($qp->grrrrrrr());
 }