Source for file core.assemble_plugin_filepath.php
Documentation is available at core.assemble_plugin_filepath.php
* assemble filepath of requested plugin
static $_filepaths_cache =
array();
$_plugin_filename =
$params['type'] .
'.' .
$params['name'] .
'.php';
if (isset
($_filepaths_cache[$_plugin_filename])) {
return $_filepaths_cache[$_plugin_filename];
foreach ((array)
$smarty->plugins_dir as $_plugin_dir) {
$_plugin_filepath =
$_plugin_dir .
DIRECTORY_SEPARATOR .
$_plugin_filename;
// see if path is relative
if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
$_relative_paths[] =
$_plugin_dir;
// relative path, see if it is in the SMARTY_DIR
// try relative to cwd (or absolute)
$_return =
$_plugin_filepath;
// still not found, try PHP include_path
if(isset
($_relative_paths)) {
foreach ((array)
$_relative_paths as $_plugin_dir) {
$_plugin_filepath =
$_plugin_dir .
DIRECTORY_SEPARATOR .
$_plugin_filename;
$_params =
array('file_path' =>
$_plugin_filepath);
require_once(SMARTY_CORE_DIR .
'core.get_include_path.php');
$_return =
$_params['new_file_path'];
$_filepaths_cache[$_plugin_filename] =
$_return;
/* vim: set expandtab: */
Documentation generated on Sun, 09 Mar 2008 23:51:05 -0300 by phpDocumentor 1.4.0