Mike42\Escpos\PrintConnectors\CupsPrintConnector::getLocalPrinters PHP Method

getLocalPrinters() protected method

Load a list of CUPS printers.
protected getLocalPrinters ( ) : array
return array A list of printer names installed on this system. Any item on this list is valid for constructing a printer.
    protected function getLocalPrinters()
    {
        $outpStr = $this->getCmdOutput("lpstat -a");
        $outpLines = explode("\n", trim($outpStr));
        foreach ($outpLines as $line) {
            $ret[] = $this->chopLpstatLine($line);
        }
        return $ret;
    }