You are here

protected function EasyRdf_Parser_RdfXml::splitURI in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php \EasyRdf_Parser_RdfXml::splitURI()

@ignore

2 calls to EasyRdf_Parser_RdfXml::splitURI()
EasyRdf_Parser_RdfXml::endState6 in vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php
@ignore
EasyRdf_Parser_RdfXml::startState6 in vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php
@ignore

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/RdfXml.php, line 165

Class

EasyRdf_Parser_RdfXml
A pure-php class to parse RDF/XML.

Code

protected function splitURI($v) {

  /* auto-splitting on / or # */
  if (preg_match('/^(.*[\\/\\#])([^\\/\\#]+)$/', $v, $m)) {
    return array(
      $m[1],
      $m[2],
    );
  }

  /* auto-splitting on last special char, e.g. urn:foo:bar */
  if (preg_match('/^(.*[\\:\\/])([^\\:\\/]+)$/', $v, $m)) {
    return array(
      $m[1],
      $m[2],
    );
  }
  return array(
    $v,
    '',
  );
}