You are here

public function purl_cache::set in Persistent URL 7

Same name and namespace in other branches
  1. 6 purl.module \purl_cache::set()

Parameters

$e: The path element for which to fire the provider handler.

File

./purl.module, line 843

Class

purl_cache
Specialized cache for storing modifier information.

Code

public function set($e) {
  if ($e->provider && $e->id) {
    $providers = purl_providers();
    $callback = $providers[$e->provider]['callback'];
    if (function_exists($callback)) {
      $args = array();
      if (isset($providers[$e->provider]['callback arguments'])) {
        $args = $providers[$e->provider]['callback arguments'];
      }
      $args[] = $e->id;
      call_user_func_array($callback, $args);
    }
  }
  return $this;
}