if a CURIE prefix has not been defined, do not convert the URI from CURIE to URI. per @attozk comment

This commit is contained in:
Ben Connito 2015-06-08 09:29:21 -04:00
parent 6b247c0525
commit 259d384bcf

View File

@ -82,14 +82,12 @@ class WampConnection extends AbstractConnectionDecorator {
*/
public function getUri($uri) {
$curieSeperator = ':';
$fullSeperator = '#';
if (preg_match('/http(s*)\:\/\//', $uri) == false) {
if (strpos($uri, $curieSeperator) !== false) {
if (strpos($uri, $curieSeperator) !== false && isset($this->WAMP->prefixes[$prefix]) === true) {
list($prefix, $action) = explode($curieSeperator, $uri);
$expandedPrefix = isset($this->WAMP->prefixes[$prefix]) ? $this->WAMP->prefixes[$prefix] : $prefix;
return $expandedPrefix . $fullSeperator . $action;
return $this->WAMP->prefixes[$prefix] . '#' . $action;
}
}