

Public Member Functions | |
| __construct ($dest) | |
| __destruct () | |
| finalize () | |
| read ($len) | |
| write ($data) | |
Public Attributes | |
| const | PLATFORM_LINUX = 0 |
| const | PLATFORM_MAC = 1 |
| const | PLATFORM_WIN = 2 |
| const | REGEX_LOCAL = "/^(LPT\d|COM\d)$/" |
| const | REGEX_PRINTERNAME = "/^[\d\w-]+(\s[\d\w-]+)*$/" |
| const | REGEX_SMB = "/^smb:\/\/([\s\d\w-]+(:[\s\d\w+-]+)?@)?([\d\w-]+\.)*[\d\w-]+\/([\d\w-]+\/)?[\d\w-]+(\s[\d\w-]+)*$/" |
Protected Member Functions | |
| finalizeLinux ($data) | |
| finalizeMac ($data) | |
| finalizeWin ($data) | |
| getCurrentPlatform () | |
| runCommand ($command, &$outputStr, &$errorStr, $inputStr=null) | |
| runCopy ($from, $to) | |
| runWrite ($data, $filename) | |
Connector for sending print jobs to
| Mike42\Escpos\PrintConnectors\WindowsPrintConnector::__construct | ( | $dest | ) |
| string | $dest |
| BadMethodCallException |
| Mike42\Escpos\PrintConnectors\WindowsPrintConnector::__destruct | ( | ) |
Print connectors should cause a NOTICE if they are deconstructed when they have not been finalized.
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
| Mike42\Escpos\PrintConnectors\WindowsPrintConnector::finalize | ( | ) |
Finish using this print connector (close file, socket, send accumulated output, etc).
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
|
protected |
Send job to printer – platform-specific Linux code.
| string | $data | Print data |
| Exception |
|
protected |
Send job to printer – platform-specific Mac code.
| string | $data | Print data |
| Exception |
|
protected |
Send data to printer – platform-specific Windows code.
| string | $data |
|
protected |
| Mike42\Escpos\PrintConnectors\WindowsPrintConnector::read | ( | $len | ) |
Read data from the printer.
| string | $len | Length of data to read. |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
|
protected |
Run a command, pass it data, and retrieve its return value, standard output, and standard error.
| string | $command | the command to run. |
| string | $outputStr | variable to fill with standard output. |
| string | $errorStr | variable to fill with standard error. |
| string | $inputStr | text to pass to the command's standard input (optional). |
|
protected |
Copy a file. Separated out so that nothing is actually printed during test runs.
| string | $from | Source file |
| string | $to | Destination file |
|
protected |
Write data to a file. Separated out so that nothing is actually printed during test runs.
| string | $data | Data to print |
| string | $filename | Destination file |
| Mike42\Escpos\PrintConnectors\WindowsPrintConnector::write | ( | $data | ) |
Write data to the print connector.
| string | $data | The data to write |
Implements Mike42\Escpos\PrintConnectors\PrintConnector.
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::PLATFORM_LINUX = 0 |
Represents Linux
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::PLATFORM_MAC = 1 |
Represents Mac
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::PLATFORM_WIN = 2 |
Represents Windows
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::REGEX_LOCAL = "/^(LPT\d|COM\d)$/" |
Valid local ports.
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::REGEX_PRINTERNAME = "/^[\d\w-]+(\s[\d\w-]+)*$/" |
Valid printer name.
| const Mike42\Escpos\PrintConnectors\WindowsPrintConnector::REGEX_SMB = "/^smb:\/\/([\s\d\w-]+(:[\s\d\w+-]+)?@)?([\d\w-]+\.)*[\d\w-]+\/([\d\w-]+\/)?[\d\w-]+(\s[\d\w-]+)*$/" |
Valid smb:// URI containing hostname & printer with optional user & optional password only.
1.8.8