You are here

function _pathfilter_curry in Path Filter 5.2

Same name and namespace in other branches
  1. 5 pathfilter.module \_pathfilter_curry()
  2. 6.2 pathfilter.module \_pathfilter_curry()
  3. 6 pathfilter.module \_pathfilter_curry()
  4. 7 pathfilter.module \_pathfilter_curry()
2 calls to _pathfilter_curry()
pathfilter_filter in ./pathfilter.module
Implementation of hook_filter().
_pathfilter_replace_internal in ./pathfilter.module
Replaces the internal: and files: in elements with the url for it

File

./pathfilter.module, line 93
This filter takes internal Drupal paths in double quotes, written as e.g. "internal:node/99", and replaces them with the appropriate absolute http URL using Drupal's url() function [1]. E.g. for a site located at http://example.com/mysite

Code

function _pathfilter_curry($func, $arity) {
  return create_function('', "\n    \$args = func_get_args();\n    if(count(\$args) >= {$arity})\n      return call_user_func_array('{$func}', \$args);\n    \$args = var_export(\$args, 1);\n    return create_function('','\n      \$a = func_get_args();\n      \$z = ' . \$args . ';\n      \$a = array_merge(\$z,\$a);\n      return call_user_func_array(\\'{$func}\\', \$a);\n    ');\n  ");
}