mirror of
https://github.com/anikeen-com/print-cli.git
synced 2026-03-13 13:46:07 +00:00
28 lines
688 B
PHP
28 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
use Illuminate\Support\Collection;
|
|
use Smalot\Cups\Builder\Builder;
|
|
use Smalot\Cups\Manager\PrinterManager as CupsPrinterManager;
|
|
use Smalot\Cups\Transport\Client;
|
|
use Smalot\Cups\Transport\ResponseParser;
|
|
|
|
class PrinterManager
|
|
{
|
|
protected CupsPrinterManager $printerManager;
|
|
|
|
public function __construct()
|
|
{
|
|
$client = new Client();
|
|
$builder = new Builder();
|
|
$responseParser = new ResponseParser();
|
|
$this->printerManager = new CupsPrinterManager($builder, $client, $responseParser);
|
|
}
|
|
|
|
public function getList(): Collection
|
|
{
|
|
return Collection::make($this->printerManager->getList());
|
|
}
|
|
}
|