You are here

function _libraries_require_once in Libraries API 7.2

Same name and namespace in other branches
  1. 7.3 libraries.module \_libraries_require_once()

Wrapper function for require_once.

A library file could set a $path variable in file scope. Requiring such a file directly in libraries_load_files() would lead to the local $path variable being overridden after the require_once statement. This would break loading further files. Therefore we use this trivial wrapper which has no local state that can be tampered with.

Parameters

$file_path: The file path of the file to require.

1 call to _libraries_require_once()
libraries_load_files in ./libraries.module
Loads a library's files.

File

./libraries.module, line 914
External library handling for Drupal modules.

Code

function _libraries_require_once($file_path) {
  require_once $file_path;
}