Exemplo n.º 1
0
 /**
  * Send message or command to buffer
  * @param string $text
  */
 public function text($text = '')
 {
     $this->buffer->write($text);
 }
Exemplo n.º 2
0
 /**
  * Wrapper for GS ( L, to calculate and send correct data length.
  *
  * @param string $m    Modifier/variant for function. Usually '0'.
  * @param string $fn   Function number to use, as character.
  * @param string $data Data to send.
  */
 protected function sendGraphicsData($m, $fn, $data = '')
 {
     $header = $this->intLowHigh(strlen($data) + 2, 2);
     $this->buffer->write(self::GS . '(L' . $header . $m . $fn . $data);
 }