QueryPath::enable PHP 메소드

enable() 공개 정적인 메소드

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.
    public static function enable($extensionNames)
    {
        if (is_array($extensionNames)) {
            foreach ($extensionNames as $extension) {
                \QueryPath\ExtensionRegistry::extend($extension);
            }
        } else {
            \QueryPath\ExtensionRegistry::extend($extensionNames);
        }
    }

Usage Example

예제 #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');
All Usage Examples Of QueryPath::enable