You are here

public static function QueryPathExtensionRegistry::extend in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/QueryPathExtension.php \QueryPathExtensionRegistry::extend()
  2. 7.2 QueryPath/QueryPathExtension.php \QueryPathExtensionRegistry::extend()
6 calls to QueryPathExtensionRegistry::extend()
QPDB.php in QueryPath/Extension/QPDB.php
QPList.php in QueryPath/Extension/QPList.php
QPTPL.php in QueryPath/Extension/QPTPL.php
QPXML.php in QueryPath/Extension/QPXML.php
QPXSL.php in QueryPath/Extension/QPXSL.php

... See full list

File

QueryPath/QueryPathExtension.php, line 19

Class

QueryPathExtensionRegistry

Code

public static function extend($classname) {
  self::$extensionRegistry[] = $classname;
  $class = new ReflectionClass($classname);
  $methods = $class
    ->getMethods();
  foreach ($methods as $method) {
    self::$extensionMethodRegistry[$method
      ->getName()] = $classname;
  }
}