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.
コード例 #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');
コード例 #2
0
ファイル: QPListTest.php プロジェクト: rrmodi88/querypath
 public static function setUpBeforeClass()
 {
     \QueryPath::enable('\\QueryPath\\Extension\\QPList');
 }
コード例 #3
0
ファイル: QueryPathTest.php プロジェクト: huodi/querypath
 public function testEnable()
 {
     \QueryPath::enable('\\QueryPath\\Tests\\DummyExtension');
     $qp = \QueryPath::with(\QueryPath::XHTML_STUB);
     $this->assertTrue($qp->grrrrrrr());
 }