You are here

public function purl_extension::detect in Persistent URL 6

Same name and namespace in other branches
  1. 7 includes/purl_extension.inc \purl_extension::detect()

Detect the the processor value for the current page request

Return value

value that can be pased to the parse step.

Overrides purl_processor::detect

File

includes/purl_extension.inc, line 10

Class

purl_extension
File extension style. Like ".csv"

Code

public function detect($q) {
  $last = explode('.', array_pop(explode('/', $q)));
  if (count($last) > 1) {
    return array_pop($last);
  }
  return '';
}