public static function escapePrefix($predicate, array $namespaces) {

    $exploded = explode(":", $predicate);
    if (!isset($namespaces[$exploded[0]])) {
      return $predicate;
    }
    return $namespaces[$exploded[0]] . $exploded[1];
  }
public static function escapePrefix($predicate, array $namespaces) {

    $exploded = explode(":", $predicate);
    if (!isset($namespaces[$exploded[0]])) {
      return $predicate;
    }
    return $namespaces[$exploded[0]] . $exploded[1];
  }
public static function escapePrefix ( $ predicate , array $ namespaces ) { $ exploded = explode ( ":" , $ predicate ) ; if ( ! isset ( $ namespaces [ $ exploded [ 0 ] ] ) ) { return $ predicate ; } return $ namespaces [ $ exploded [ 0 ] ] . $ exploded [ 1 ] ; }
Escapes namespace prefixes in predicates.

@param string $predicate
The predicate whose namespace you wish to escape.
@param array $namespaces
Associative array of namespaces keyed by prefix.

@return string
The predicate with escaped namespace prefix.
Escapes namespace prefixes in predicates .