Class QueryPathExtensionRegistry

(line 82)

Description


Located in File: /src/QueryPath/QueryPathExtension.php

A registry for QueryPath extensions.

QueryPath extensions should call the QueryPathExtensionRegistry::extend() function to register their extension classes. The QueryPath library then uses this information to determine what QueryPath extensions should be loaded and executed.



Class Variables

Summary:
static mixed $extensionRegistry
static mixed $useRegistry

static $extensionMethodRegistry = array() (line 94)

Data type : mixed

  • access: - protected

static $extensionRegistry = array() (line 93)

Data type : mixed

The extension registry. This should consist of an array of class names.
  • access: - protected

static $useRegistry = TRUE (line 88)

Data type : mixed

Internal flag indicating whether or not the registry should be used for automatic extension loading. If this is false, then implementations should not automatically load extensions.
  • access: - public

Class Constants

Summary:

Method Detail

Summary:
static void autoloadExtensions ([ $boolean = TRUE])
static void extend ( $classname)
static array getExtensions (QueryPath $qp)
static string getMethodClass (string $name)
static boolean hasExtension (string $name)
static boolean hasMethod (string $name)

Static Method autoloadExtensions (line 181)

void autoloadExtensions( [ $boolean = TRUE])

Enable or disable automatic extension loading.

If extension autoloading is disabled, then QueryPath will not automatically load all registred extensions when a new QueryPath object is created using qp().

Parameters

  • $boolean:

Info

  • access - public

Static Method extend (line 98)

void extend( $classname)

Extend QueryPath with the given extension class.

Parameters

  • $classname:

Info

  • access - public

Static Method getExtensions (line 166)

array getExtensions( QueryPath $qp)

Get extensions for the given QueryPath object.

Given a QueryPath object, this will return an associative array of extension names to (new) instances. Generally, this is intended to be used internally.

Parameters

  • QueryPath $qp: The QueryPath into which the extensions should be registered.

Info

  • return - An associative array of classnames to instances.
  • access - public

Static Method getMethodClass (line 150)

string getMethodClass( string $name)

Get the class that a given method belongs to.

Given a method name, this will check all registered extension classes to see if any of them has the named method. If so, this will return the classname.

Note that if two extensions are registered that contain the same method name, the last one registred will be the only one recognized.

Parameters

  • string $name: The name of the method.

Info

  • return - The name of the class.
  • access - public

Static Method hasExtension (line 132)

boolean hasExtension( string $name)

Check to see if the given extension class is registered.

Given a class name for a QueryPathExtension class, this will check to see if that class is registered. If so, it will return TRUE.

Parameters

  • string $name: The name of the class.

Info

  • return - TRUE if the class is registered, FALSE otherwise.
  • access - public

Static Method hasMethod (line 117)

boolean hasMethod( string $name)

Check to see if a method is known.

This checks to see if the given method name belongs to one of the registered extensions. If it does, then this will return TRUE.

Parameters

  • string $name: The name of the method to search for.

Info

  • return - TRUE if the method exists, false otherwise.
  • access - public

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Sun, 25 Jul 2010 16:09:11 -0500 by phpDocumentor 1.4.3