function toNTriples($v, $ns = '', $raw = 0)
 {
     ARC2::inc('NTriplesSerializer');
     if (!$ns) {
         $ns = isset($this->a['ns']) ? $this->a['ns'] : array();
     }
     $ser = new ARC2_NTriplesSerializer(array_merge($this->a, array('ns' => $ns)), $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v, $raw) : $ser->getSerializedIndex($v, $raw);
 }
Exemple #2
0
 function toNTriples($v, $ns = '')
 {
     ARC2::inc('NTriplesSerializer');
     $conf = array('ns' => $ns ? $ns : isset($this->a['ns']) ? $this->a['ns'] : array());
     $ser = new ARC2_NTriplesSerializer($conf, $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v) : $ser->getSerializedIndex($v);
 }