当前位置: 首页>>代码示例>>PHP>>正文


PHP Node::getUri方法代码示例

本文整理汇总了PHP中Node::getUri方法的典型用法代码示例。如果您正苦于以下问题:PHP Node::getUri方法的具体用法?PHP Node::getUri怎么用?PHP Node::getUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Node的用法示例。


在下文中一共展示了Node::getUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getBindingString

 /**
  * Helper Function for function buildXmlResult($vartable). Generates
  * an xml string for a single variable an their corresponding value.
  *
  * @param  String  $varname The variables name
  * @param  Node    $varvalue The value of the variable
  * @return String  The xml string
  */
 protected function _getBindingString($varname, $varvalue)
 {
     $binding = '<binding name="' . $varname . '">';
     $value = '<unbound/>';
     if ($varvalue instanceof BlankNode) {
         $value = '<bnode>' . $varvalue->getLabel() . '</bnode>';
     } else {
         if ($varvalue instanceof Resource) {
             $value = '<uri>' . $varvalue->getUri() . '</uri>';
         } else {
             if ($varvalue instanceof Literal) {
                 $label = htmlspecialchars($varvalue->getLabel());
                 $value = '<literal>' . $label . '</literal>';
                 if ($varvalue->getDatatype() != null) {
                     $value = '<literal datatype="' . $varvalue->getDatatype() . '">' . $label . '</literal>';
                 }
                 if ($varvalue->getLanguage() != null) {
                     $value = '<literal xml:lang="' . $varvalue->getLanguage() . '">' . $label . '</literal>';
                 }
             }
         }
     }
     $binding = $binding . $value . '</binding>';
     return $binding;
 }
开发者ID:p4535992,项目名称:programate,代码行数:33,代码来源:XML.php

示例2: equals

 /**
  * @see \Saft\Rdf\Node
  */
 public function equals(Node $toCompare)
 {
     // It only compares URIs, everything will be quit with false.
     if ($toCompare->isNamed()) {
         return $this->getUri() == $toCompare->getUri();
     }
     return false;
 }
开发者ID:guitarmarx,项目名称:Saft,代码行数:11,代码来源:AbstractNamedNode.php

示例3: index

 /**
  * create new node index
  *
  * @throws \Neo4j\Exception\HttpException
  *
  * @param \Neo4j\Node $node
  * @param string $key
  * @param string $value
  *
  * @return void
  */
 public function index(Node $node, $key, $value)
 {
     $this->_uri = $this->_db->getBaseUri() . 'index/node/' . $key . '/' . $value;
     $this->_data = $node->getUri();
     list($response, $http_code) = Request::post($this->_uri, $this->_data);
     if ($http_code != 201) {
         throw new \Neo4j\Exception\HttpException($http_code);
     }
 }
开发者ID:nightchiller,项目名称:pneo4j,代码行数:20,代码来源:Index.php

示例4: __construct

 /**
  * @param string $value  The Literal value
  * @param Node $datatype The datatype of the Literal (respectively defaults to xsd:string or rdf:langString)
  * @param string $lang   The language tag of the Literal (optional)
  */
 public function __construct($value, Node $datatype = null, $lang = null)
 {
     if ($value === null) {
         throw new \Exception('Literal value can\'t be null. Please use AnyPattern if you need a variable.');
     } elseif (!is_string($value)) {
         throw new \Exception("The literal value has to be of type string");
     }
     $this->value = $value;
     if ($lang !== null) {
         $this->lang = (string) $lang;
     }
     if ($lang !== null && $datatype !== null && $datatype->isNamed() && $datatype->getUri() !== self::$rdfLangString) {
         throw new \Exception('Language tagged Literals must have <' . self::$rdfLangString . '> datatype.');
     }
     if ($datatype !== null) {
         $this->datatype = $datatype;
     } elseif ($lang !== null) {
         $this->datatype = new NamedNodeImpl(self::$rdfLangString);
     } else {
         $this->datatype = new NamedNodeImpl(self::$xsdString);
     }
 }
开发者ID:guitarmarx,项目名称:Saft,代码行数:27,代码来源:LiteralImpl.php


注:本文中的Node::getUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。