function toRDFJSON($v, $ns = '')
 {
     ARC2::inc('RDFJSONSerializer');
     if (!$ns) {
         $ns = isset($this->a['ns']) ? $this->a['ns'] : array();
     }
     $ser = new ARC2_RDFJSONSerializer(array_merge($this->a, array('ns' => $ns)), $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v) : $ser->getSerializedIndex($v);
 }
예제 #2
0
 function toRDFJSON($v, $ns = '')
 {
     ARC2::inc('RDFJSONSerializer');
     $conf = array('ns' => $ns ? $ns : isset($this->a['ns']) ? $this->a['ns'] : array());
     $ser = new ARC2_RDFJSONSerializer($conf, $this);
     return isset($v[0]) && isset($v[0]['s']) ? $ser->getSerializedTriples($v) : $ser->getSerializedIndex($v);
 }