mirror of
https://github.com/anikeen-com/print-cli.git
synced 2026-03-13 21:56:07 +00:00
Add autowire
Add logs command Improve print jobs handling Improve installation/documentation
This commit is contained in:
27
app/Support/PrinterManager.php
Normal file
27
app/Support/PrinterManager.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user