コード例 #1
0
 function toTurtle($v, $ns = '', $raw = 0)
 {
     ARC2::inc('TurtleSerializer');
     if (!$ns) {
         $ns = isset($this->a['ns']) ? $this->a['ns'] : array();
     }
     $ser = new ARC2_TurtleSerializer(array_merge($this->a, array('ns' => $ns)), $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v, $raw) : $ser->getSerializedIndex($v, $raw);
 }
コード例 #2
0
 function toTurtle($v, $ns = '')
 {
     ARC2::inc('TurtleSerializer');
     $conf = array('ns' => $ns ? $ns : isset($this->a['ns']) ? $this->a['ns'] : array());
     $ser = new ARC2_TurtleSerializer($conf, $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v) : $ser->getSerializedIndex($v);
 }