QueryPath\ExtensionRegistry::hasExtension PHP Method

hasExtension() public static method

Given a class name for a QueryPath::Extension class, this will check to see if that class is registered. If so, it will return TRUE.
public static hasExtension ( string $name ) : boolean
$name string The name of the class.
return boolean TRUE if the class is registered, FALSE otherwise.
    public static function hasExtension($name)
    {
        return in_array($name, self::$extensionRegistry);
    }

Usage Example

 public function testExtend()
 {
     $this->assertFalse(ExtensionRegistry::hasExtension('\\QueryPath\\Tests\\StubExtensionThree'));
     ExtensionRegistry::extend('\\QueryPath\\Tests\\StubExtensionThree');
     $this->assertTrue(ExtensionRegistry::hasExtension('\\QueryPath\\Tests\\StubExtensionThree'));
 }