You are here

function querypath_boot in QueryPath 6

Same name and namespace in other branches
  1. 7.3 querypath.module \querypath_boot()

Implementation of hook_boot(). Attempt to load the QueryPath library early in the boot cycle.

File

./querypath.module, line 35
The QueryPath module.

Code

function querypath_boot() {

  // I'm not entirely happy with this particular method of including stuff.
  // But this seems to be the best way. (Note that there is already a check
  // in the install file.)
  // We include by relative path to allow PEAR and other things on PHP_PATH to
  // take precedence over the bundled version.
  @(include_once 'QueryPath/QueryPath.php');
  if (function_exists('qp')) {

    // module_load_include is sorta... meh. Just adds another stat call to a
    // require_once call.... plus it is apparently not ready in hook_boot.

    //module_load_include('inc', 'querypath', 'classes');
    require_once 'querypath.classes.inc';
  }
  else {
    watchdog('querypath', 'The QueryPath library is missing.', array(), WATCHDOG_ERROR);
  }
}