

Public Member Functions | |
| __construct ($dest) | |
| __destruct () | |
| finalize () | |
| read ($len) | |
| write ($data) | |
Protected Member Functions | |
| getCmdOutput ($cmd) | |
| getLocalPrinters () | |
Print connector that passes print data to CUPS print commands. Your printer mut be installed on the local CUPS instance to use this connector.
| Mike42\Escpos\PrintConnectors\CupsPrintConnector::__construct | ( | $dest | ) |
Construct new CUPS print connector.
| string | $dest | The CUPS printer name to print to. This must be loaded using a raw driver. |
| BadMethodCallException |
| Mike42\Escpos\PrintConnectors\CupsPrintConnector::__destruct | ( | ) |
Cause a NOTICE if deconstructed before the job was printed.
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
| Mike42\Escpos\PrintConnectors\CupsPrintConnector::finalize | ( | ) |
Send job to printer.
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
|
protected |
Run a command and throw an exception if it fails, or return the output if it works. (Basically exec() with good error handling)
| string | $cmd | Command to run |
|
protected |
Load a list of CUPS printers.
| Mike42\Escpos\PrintConnectors\CupsPrintConnector::read | ( | $len | ) |
Read data from the printer.
| string | $len | Length of data to read. |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
| Mike42\Escpos\PrintConnectors\CupsPrintConnector::write | ( | $data | ) |
| string | $data |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
1.8.8