PHP Класс Mike42\Escpos\PrintBuffers\EscposPrintBuffer

Copyright (c) 2014-2015 Michael Billington , incorporating modifications by: - Roni Saha - Gergely Radics - Warren Doyle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This class manages newlines and character encoding for the target printer, and can be interchanged for an image-bassed buffer (ImagePrintBuffer) if you can't get it operating properly on your machine.
Наследование: implements Mike42\Escpos\PrintBuffers\PrintBuffer
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) Empty print buffer.
flush ( )
getPrinter ( )
setPrinter ( Printer $printer = null )
writeText ( $text )
writeTextRaw ( $text )

Приватные методы

Метод Описание
asciiCheck ( string $char, boolean $extended = false ) : boolean Return true if a character is an ASCII printable character.
identifyText ( string $text ) : boolean | integer Return an encoding which we can start to use for outputting this text.
loadAvailableCharacters ( ) Based on the printer's connector, compute (or load a cached copy of) maps of UTF character to unicode characters for later use.
write ( string $data ) Write data to the underlying printer.
writeTextUsingEncoding ( string $text, integer $encodingNo ) Encode a block of text using the specified map, and write it to the printer.

Описание методов

__construct() публичный Метод

Empty print buffer.
public __construct ( )

flush() публичный Метод

public flush ( )

getPrinter() публичный Метод

public getPrinter ( )

setPrinter() публичный Метод

public setPrinter ( Printer $printer = null )
$printer Mike42\Escpos\Printer

writeText() публичный Метод

public writeText ( $text )

writeTextRaw() публичный Метод

public writeTextRaw ( $text )