james2001/zxing-bundle

1.0.0 2014-12-14 20:20 UTC

This package is auto-updated.

Last update: 2024-10-14 05:44:46 UTC


README

Call zxing (code barre reader) with Symfony2

Requirement

This library package requires PHP 5.3 or later, java, symfony/framework-bundle ~2.1 and james2001/zxing ~1.0

Setup

  • With composer (recommended)

Add the following line to the composer.json of your project and launch composer install command

{
    "require": {
        "james001/zxing-bundle": "~1.0"
    }
}

Launch install from your project root with:

composer install --no-dev --prefer-dist

Add bundle in AppKernel.php

 $bundles = array(
 ...
new James2001\Bundle\ZxingBundle\James2001ZxingBundle(),
...
 );

Use

$imagePath = '/path/image.jpg';
$myCode = $this->get('james2001.zxing')->findFirst($imagePath);