Beispiel #1
0
 protected function _writeObject($o, $oType, $lang = null, $dType = null)
 {
     if ($oType === 'uri') {
         $this->_writeUri($o);
     } else {
         if ($oType === 'bnode') {
             $this->_write($o);
         } else {
             if (strpos($o, "\n") !== false || strpos($o, "\r") !== false || strpos($o, "\t") !== false) {
                 $this->_write('"""');
                 $this->_write(Erfurt_Syntax_Utils_Turtle::encodeLongString($o));
                 $this->_write('"""');
             } else {
                 $this->_write('"');
                 $this->_write(Erfurt_Syntax_Utils_Turtle::encodeString($o));
                 $this->_write('"');
             }
             if (null !== $lang) {
                 $this->_write('@' . $lang);
             } else {
                 if (null !== $dType) {
                     $this->_write('^^');
                     $this->_writeUri($dType);
                 }
             }
         }
     }
 }
Beispiel #2
0
 protected function _writeObject($o, $oType, $lang = null, $dType = null)
 {
     if ($oType === 'uri') {
         $this->_writeUri($o);
     } else {
         if ($oType === 'bnode') {
             $this->_writeBNode($o);
         } else {
             $this->_write('"');
             $this->_write(Erfurt_Syntax_Utils_Turtle::encodeString($o));
             $this->_write('"');
             if (null !== $lang) {
                 $this->_write('@' . $lang);
             } else {
                 if (null !== $dType) {
                     $this->_write('^^');
                     $this->_writeUri($dType);
                 }
             }
         }
     }
 }