diff --git a/index.php b/index.php index 1cb140d..0ee9535 100644 --- a/index.php +++ b/index.php @@ -80,7 +80,7 @@ try { $escpos = new Escpos(); $escpos->load($printer); - $escpos->print($rdata->data); + $escpos->printData($rdata->data); echo '> Printied', "\n"; } catch (Exception $e) { echo '> Error occurred, unable to print. ', $e->getMessage(), "\n"; @@ -97,7 +97,7 @@ try { $escpos = new Escpos(); $escpos->load($printer); - $escpos->print($rdata->data); + $escpos->printData($rdata->data); echo '> Printied', "\n"; } catch (Exception $e) { echo '> Error occurred, unable to print. ', $e->getMessage(), "\n"; @@ -112,7 +112,7 @@ try { $escpos = new Escpos(); $escpos->load($rdata->data->printer); - $escpos->print($rdata->data); + $escpos->printData($rdata->data); echo '> Printied', "\n"; } catch (Exception $e) { echo '> Error occurred, unable to print. ', $e->getMessage(), "\n"; diff --git a/lib/Escpos.php b/lib/Escpos.php index de107a3..305d80b 100644 --- a/lib/Escpos.php +++ b/lib/Escpos.php @@ -40,7 +40,7 @@ public function load($printer) { } - public function print($data) { + public function printData($data) { if (isset($data->logo) && !empty($data->logo)) { $file = basename($data->logo);