| escpos-php

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Pages
Public Member Functions | Protected Member Functions | List of all members
Mike42\Escpos\PrintConnectors\CupsPrintConnector Class Reference
Inheritance diagram for Mike42\Escpos\PrintConnectors\CupsPrintConnector:
[legend]
Collaboration diagram for Mike42\Escpos\PrintConnectors\CupsPrintConnector:
[legend]

## Public Member Functions
| __construct ($dest)
| __destruct ()
| finalize ()
| read ($len)
| write ($data)

## Protected Member Functions
| getCmdOutput ($cmd)
| getLocalPrinters ()

## Detailed Description

Print connector that passes print data to CUPS print commands. Your printer mut be installed on the local CUPS instance to use this connector.

## Constructor & Destructor Documentation

Mike42\Escpos\PrintConnectors\CupsPrintConnector::__construct | ( |  | $dest | ) |

Construct new CUPS print connector.

Parameters

  string | $dest | The CUPS printer name to print to. This must be loaded using a raw driver.

Exceptions

  BadMethodCallException |

Mike42\Escpos\PrintConnectors\CupsPrintConnector::__destruct | ( |  | ) |

Cause a NOTICE if deconstructed before the job was printed.

Implements Mike42\Escpos\PrintConnectors\PrintConnector.

## Member Function Documentation

Mike42\Escpos\PrintConnectors\CupsPrintConnector::finalize | ( |  | ) |

Send job to printer.

Implements Mike42\Escpos\PrintConnectors\PrintConnector.

Mike42\Escpos\PrintConnectors\CupsPrintConnector::getCmdOutput | ( |  | $cmd | ) |
| protected

Run a command and throw an exception if it fails, or return the output if it works. (Basically exec() with good error handling)

Parameters

  string | $cmd | Command to run

Mike42\Escpos\PrintConnectors\CupsPrintConnector::getLocalPrinters | ( |  | ) |
| protected

Load a list of CUPS printers.

Returns
  array A list of printer names installed on this system. Any item on this list is valid for constructing a printer.

Mike42\Escpos\PrintConnectors\CupsPrintConnector::read | ( |  | $len | ) |

Read data from the printer.

Parameters

  string | $len | Length of data to read.

Returns
  Data read from the printer, or false where reading is not possible.

Implements Mike42\Escpos\PrintConnectors\PrintConnector.

Mike42\Escpos\PrintConnectors\CupsPrintConnector::write | ( |  | $data | ) |

Parameters

  string | $data |

Implements Mike42\Escpos\PrintConnectors\PrintConnector.

The documentation for this class was generated from the following file:

- C:/www/aplusnet/incahellas.com/public_html/lib/escpos-php-development/src/Mike42/Escpos/PrintConnectors/CupsPrintConnector.php