Ejemplo n.º 1
0
 /**
  * Get a binary representation of the query, ready to send to orient.
  *
  * @return string A binary serialized version of the query class.
  */
 public function binarySerialize()
 {
     $bytes = Binary::packString($this->getOrientClass());
     $bytes .= Binary::packString($this->language);
     $bytes .= Binary::packString($this->text);
     if (count($this->params)) {
         $bytes .= Binary::packString($this->serializeParams());
     } else {
         $bytes .= Binary::packInt(0);
     }
     $bytes .= Binary::packByte(0);
     return $bytes;
 }
Ejemplo n.º 2
0
 /**
  * Write an integer to the socket.
  *
  * @param int $value
  */
 protected function writeInt($value)
 {
     $this->socket->write(Binary::packInt($value));
 }