summaryrefslogtreecommitdiffstats
path: root/src/examples/example.php
diff options
context:
space:
mode:
authordsiddhath2 <dsiddhath2@gmail.com>2017-09-12 18:01:52 +0530
committerdsiddhath2 <dsiddhath2@gmail.com>2017-09-12 18:01:52 +0530
commitc49faf279c8fdbef10b6d67824b5ef8b0b957a6f (patch)
tree2d8f204e78e27526dd5e5ea6029b90d1816ab432 /src/examples/example.php
parentd9ec3d05bc30d4640b79afeba51e01d1f8df17c9 (diff)
downloadphp-zxing-c49faf279c8fdbef10b6d67824b5ef8b0b957a6f.zip
php-zxing-c49faf279c8fdbef10b6d67824b5ef8b0b957a6f.tar.gz
php-zxing-c49faf279c8fdbef10b6d67824b5ef8b0b957a6f.tar.bz2
Updated the Doc and wrote fix if the image is not found, Path not set properly
Diffstat (limited to 'src/examples/example.php')
-rw-r--r--src/examples/example.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/example.php b/src/examples/example.php
index ddacc22..ea3d4c6 100644
--- a/src/examples/example.php
+++ b/src/examples/example.php
@@ -7,8 +7,10 @@
use PHPZxing\PHPZxingDecoder;
$decoder = new PHPZxingDecoder();
- $decodedData = $decoder->decode('../images/Code128Barcode.jpg');
- print_r($decodedData);
+ $decodedData = current($decoder->decode('../images/Code128Barcode.jpg'));
+ $decodedData->getImageValue();
+ $decodedData->getFormat();
+ $decodedData->getType();
$config = array(
'try_harder' => true,