Browse files

php5

  • Loading branch information...
1 parent 53d1119 commit a931a7dd28010272d99274ea3d6f6c5c14fd777b @CloCkWeRX CloCkWeRX committed Dec 10, 2011
View
25 Image/Barcode2.php
@@ -2,7 +2,7 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode class
+ * Image_Barcode2 class
*
* Package to render barcodes
*
@@ -15,30 +15,30 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
require_once 'PEAR.php';
/**
- * Image_Barcode class
+ * Image_Barcode2 class
*
* Package which provides a method to create barcode using GD library.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-class Image_Barcode extends PEAR
+class Image_Barcode2 extends PEAR
{
/**
* Draws a image barcode
@@ -59,9 +59,9 @@ class Image_Barcode extends PEAR
* @access public
*
* @author Marcelo Subtil Marcal <msmarcal@php.net>
- * @since Image_Barcode 0.3
+ * @since Image_Barcode2 0.3
*/
- function &draw($text, $type = 'int25', $imgtype = 'png', $bSendToBrowser = true, $height=60, $barwidth = 1)
+ function draw($text, $type = 'int25', $imgtype = 'png', $bSendToBrowser = true, $height=60, $barwidth = 1)
{
//Make sure no bad files are included
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $type)) {
@@ -71,18 +71,18 @@ function &draw($text, $type = 'int25', $imgtype = 'png', $bSendToBrowser = true,
return PEAR::raiseError($type . ' barcode is not supported');
}
- $classname = 'Image_Barcode_' . $type;
+ $classname = 'Image_Barcode2_' . $type;
if (!in_array('draw',get_class_methods($classname))) {
return PEAR::raiseError("Unable to find draw method in '$classname' class");
}
- @$obj =& new $classname();
+ @$obj = new $classname();
if (isset($obj->_barcodeheight)) $obj->_barcodeheight = $height;
if (isset($obj->_barwidth)) $obj->_barwidth = $barwidth;
- $img = &$obj->draw($text, $imgtype);
+ $img = $obj->draw($text, $imgtype);
if (PEAR::isError($img)) {
return $img;
@@ -114,4 +114,3 @@ function &draw($text, $type = 'int25', $imgtype = 'png', $bSendToBrowser = true,
}
}
-?>
View
22 Image/Barcode2/Code39.php
@@ -2,9 +2,9 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_Code39 class
+ * Image_Barcode2_Code39 class
*
- * Image_Barcode_Code39 creates Code 3 of 9 ( Code39 ) barcode images. It's
+ * Image_Barcode2_Code39 creates Code 3 of 9 ( Code39 ) barcode images. It's
* implementation borrows heavily for the perl module GD::Barcode::Code39
*
* PHP versions 5
@@ -16,32 +16,32 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-require_once 'Image/Barcode.php';
+require_once 'Image/Barcode2.php';
/**
- * Image_Barcode_Code39 class
+ * Image_Barcode2_Code39 class
*
* Package which provides a method to create Code39 using GD library.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Ryan Briones <ryanbriones@webxdesign.org>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
- * @link http://pear.php.net/package/Image_Barcode
- * @since Image_Barcode 0.5
+ * @link http://pear.php.net/package/Image_Barcode2
+ * @since Image_Barcode2 0.5
*/
-class Image_Barcode_Code39 extends Image_Barcode
+class Image_Barcode2_Code39 extends Image_Barcode2
{
/**
* Barcode type
@@ -235,7 +235,7 @@ private function _plot($noText = false, $bHeight = 0)
/**
- * Send image to the browser; for Image_Barcode compaitbility
+ * Send image to the browser; for Image_Barcode2 compaitbility
*
* @param string $text
* @param string $imgtype Image type; accepts jpg, png, and gif, but gif only works if you've payed for licensing
View
12 Image/Barcode2/code128.php
@@ -2,7 +2,7 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_code128 class
+ * Image_Barcode2_code128 class
*
* Renders Code128 barcodes
* Code128 is a high density encoding for alphanumeric strings.
@@ -20,7 +20,7 @@
* I originally wrote this algorithm in Visual Basic 6 for a Rapid
* Software Development class, where we printed Code128 B bar codes
* to read using Cue Cat bar code readers. I rewrote the algorithm
- * using PHP for inclusion in the PEAR Image_Barcode project.
+ * using PHP for inclusion in the PEAR Image_Barcode2 project.
*
* The Code128B bar codes produced by the algorithm have been validated
* using my trusty Cue-Cat bar code reader.
@@ -34,17 +34,17 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Jeffrey K. Brown <jkb@darkfantastic.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
require_once 'Image/Barcode.php';
-class Image_Barcode_code128 extends Image_Barcode
+class Image_Barcode2_code128 extends Image_Barcode2
{
private $_type = 'code128';
private $_barcodeheight = 60;
@@ -190,7 +190,7 @@ public function image($text, $imgtype = 'png')
/**
* @internal
- * In the Image_Barcode_code128 constructor, we initialize
+ * In the Image_Barcode2_code128 constructor, we initialize
* the $code array, containing the bar and space pattern
* for the Code128 B character set.
*/
View
14 Image/Barcode2/ean13.php
@@ -2,11 +2,11 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_ean13 class
+ * Image_Barcode2_ean13 class
*
* Renders EAN 13 barcodes
*
- * PHP versions 4
+ * PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
@@ -23,10 +23,10 @@
* @link http://pear.php.net/package/Image_Barcode
*/
-require_once 'Image/Barcode.php';
+require_once 'Image/Barcode2.php';
/**
- * Image_Barcode_ean13 class
+ * Image_Barcode2_ean13 class
*
* Package which provides a method to create EAN 13 barcode using GD library.
*
@@ -37,9 +37,9 @@
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
* @link http://pear.php.net/package/Image_Barcode
- * @since Image_Barcode 0.4
+ * @since Image_Barcode2 0.4
*/
-class Image_Barcode_ean13 extends Image_Barcode
+class Image_Barcode2_ean13 extends Image_Barcode2
{
/**
* Barcode type
@@ -153,7 +153,7 @@ class Image_Barcode_ean13 extends Image_Barcode
* @todo Check if $text is number and len=13
*
*/
- function &draw($text, $imgtype = 'png')
+ function draw($text, $imgtype = 'png')
{
// Calculate the barcode width
$barcodewidth = (strlen($text)) * (7 * $this->_barwidth)
View
22 Image/Barcode2/ean8.php
@@ -2,11 +2,11 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_ean8 class
+ * Image_Barcode2_ean8 class
*
* Renders EAN 8 barcodes
*
- * PHP versions 4
+ * PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
@@ -15,32 +15,32 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Tobias Frost <tobi@coldtobi.de> ,
* based on EAN13 code by Didier Fournout <didier.fournout@nyc.fr>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-require_once 'Image/Barcode.php';
+require_once 'Image/Barcode2.php';
/**
- * Image_Barcode_ean8 class
+ * Image_Barcode2_ean8 class
*
* Package which provides a method to create EAN 13 barcode using GD library.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Tobias Frost <tobi@coldtobi.de> ,
* based on EAN13 code by Didier Fournout <didier.fournout@nyc.fr>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-class Image_Barcode_ean8 extends Image_Barcode
+class Image_Barcode2_ean8 extends Image_Barcode2
{
/**
* Barcode type
@@ -132,7 +132,7 @@ class Image_Barcode_ean8 extends Image_Barcode
* @todo Check if $text is number and len=8
*
*/
- function &draw($text, $imgtype = 'png')
+ function draw($text, $imgtype = 'png')
{
// Calculate the barcode width
$barcodewidth = (strlen($text)) * (7 * $this->_barwidth)
@@ -221,4 +221,4 @@ function &draw($text, $imgtype = 'png')
} // function create
} // class
-?>
+?>
View
16 Image/Barcode2/int25.php
@@ -2,7 +2,7 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_int25 class
+ * Image_Barcode2_int25 class
*
* Renders Interleaved 2 of 5 barcodes
*
@@ -15,31 +15,31 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
require_once 'Image/Barcode.php';
/**
- * Image_Barcode_int25 class
+ * Image_Barcode2_int25 class
*
* Package which provides a method to create Interleaved 2 of 5 barcode using GD library.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Marcelo Subtil Marcal <msmarcal@php.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-class Image_Barcode_int25 extends Image_Barcode
+class Image_Barcode2_int25 extends Image_Barcode2
{
/**
* Barcode type
@@ -96,7 +96,7 @@ class Image_Barcode_int25 extends Image_Barcode
* @access public
*
* @author Marcelo Subtil Marcal <msmarcal@php.net>
- * @since Image_Barcode 0.3
+ * @since Image_Barcode2 0.3
*/
public function image($text, $imgtype = 'png')
View
18 Image/Barcode2/postnet.php
@@ -2,7 +2,7 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_postnet class
+ * Image_Barcode2_postnet class
*
* Renders PostNet barcodes
*
@@ -15,12 +15,12 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Josef "Jeff" Sipek <jeffpc@optonline.net>
* @copyright 2005 Josef "Jeff" Sipek
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
/*
@@ -36,23 +36,23 @@
* density: 22 bars/inch = 8.66 bars/cm
*/
-require_once 'Image/Barcode.php';
+require_once 'Image/Barcode2.php';
/**
- * Image_Barcode_postnet class
+ * Image_Barcode2_postnet class
*
* Package which provides a method to create PostNet barcode using GD library.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Josef "Jeff" Sipek <jeffpc@optonline.net>
* @copyright 2005 Josef "Jeff" Sipek
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-class Image_Barcode_postnet extends Image_Barcode
+class Image_Barcode2_postnet extends Image_Barcode2
{
/**
* Barcode type
@@ -109,7 +109,7 @@ class Image_Barcode_postnet extends Image_Barcode
* @access public
*
* @author Josef "Jeff" Sipek <jeffpc@optonline.net>
- * @since Image_Barcode 0.3
+ * @since Image_Barcode2 0.3
*/
public function image($text, $imgtype = 'png')
View
18 Image/Barcode2/upca.php
@@ -2,7 +2,7 @@
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/**
- * Image_Barcode_upca class
+ * Image_Barcode2_upca class
*
* Renders UPC-A barcodes
*
@@ -15,39 +15,39 @@
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Jeffrey K. Brown <jkb@darkfantastic.net>
* @author Didier Fournout <didier.fournout@nyc.fr>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-require_once 'Image/Barcode.php';
+require_once 'Image/Barcode2.php';
/**
- * Image_Barcode_upca class
+ * Image_Barcode2_upca class
*
* Package which provides a method to create UPC-A barcode using GD library.
*
* Slightly Modified ean13.php to get upca.php I needed a way to print
- * UPC-A bar codes on a PHP page. The Image_Barcode class seemed like
+ * UPC-A bar codes on a PHP page. The Image_Barcode2 class seemed like
* the best way to do it, so I modified ean13 to print in the UPC-A format.
* Checked the bar code tables against some documentation below (no errors)
* and validated the changes with my trusty cue-cat.
* http://www.indiana.edu/~atmat/units/barcodes/bar_t4.htm
*
* @category Image
- * @package Image_Barcode
+ * @package Image_Barcode2
* @author Jeffrey K. Brown <jkb@darkfantastic.net>
* @author Didier Fournout <didier.fournout@nyc.fr>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: @package_version@
- * @link http://pear.php.net/package/Image_Barcode
+ * @link http://pear.php.net/package/Image_Barcode2
*/
-class Image_Barcode_upca extends Image_Barcode
+class Image_Barcode2_upca extends Image_Barcode2
{
/**
* Barcode type
View
46 package.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Image_Barcode</name>
+<package packagerversion="1.9.4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+ <name>Image_Barcode2</name>
<channel>pear.php.net</channel>
<summary>Barcode generation</summary>
<description>With Image_Barcode class you can create a barcode
@@ -14,11 +14,11 @@
<email>msmarcal@php.net</email>
<active>yes</active>
</lead>
- <date>2010-10-25</date>
- <time>19:44:01</time>
+ <date>2011-12-10</date>
+ <time>22:34:22</time>
<version>
- <release>1.1.1</release>
- <api>1.1.0</api>
+ <release>0.1.0</release>
+ <api>0.1.0</api>
</version>
<stability>
<release>stable</release>
@@ -35,19 +35,21 @@ Bug #13794 Some numbers produce malformed &quot;UPC A&quot; barcodes
<file baseinstalldir="Image" md5sum="9d09306ee5d354c7d7216e14e3b81c49" name="docs/Readme.txt" role="doc" />
<file baseinstalldir="Image" md5sum="d027dd2e78465162010a1cab265eb09b" name="docs/examples/barcode_img.php" role="doc" />
<file baseinstalldir="Image" md5sum="783855c825cbb516b3cf7aefa0b09d29" name="docs/examples/test-image-barcode.php" role="doc" />
- <file baseinstalldir="/" md5sum="a0f4538546e40c0e08d5f30b7640a816" name="Image/Barcode.php" role="php" />
- <file baseinstalldir="/" md5sum="e6258d77d32860d08ab309fbace6bd24" name="Image/Barcode/Code39.php" role="php" />
- <file baseinstalldir="/" md5sum="25703aeec6784fdf601b0a7502ebbc22" name="Image/Barcode/code128.php" role="php" />
- <file baseinstalldir="/" md5sum="13d6e69e9615b52a7636b8d67e5b8e2a" name="Image/Barcode/ean13.php" role="php" />
- <file baseinstalldir="/" md5sum="c152c7c632fe86c90d0b0e1cd2844838" name="Image/Barcode/int25.php" role="php" />
- <file baseinstalldir="/" md5sum="b4f9983ac55b720bc262680829f8665a" name="Image/Barcode/postnet.php" role="php" />
- <file baseinstalldir="/" md5sum="f65dff9c3c28d0422b20efa766067bc1" name="Image/Barcode/upca.php" role="php" />
+ <file baseinstalldir="/" md5sum="7d134244f64ed011a96cdb97bdcb45ad" name="Image/Barcode2.php" role="php" />
+ <file baseinstalldir="/" md5sum="5da23d9e0818080fcc2bba1c95b24ece" name="Image/Barcode2/Code39.php" role="php" />
+ <file baseinstalldir="/" md5sum="630a68961a5ab99765868e0c72a53213" name="Image/Barcode2/code128.php" role="php" />
+ <file baseinstalldir="/" md5sum="d34fea1279ac20af35f08231ed16d6d3" name="Image/Barcode2/ean8.php" role="php" />
+ <file baseinstalldir="/" md5sum="5fb832ed8e90bd0ec1ed1bffe6f1ee98" name="Image/Barcode2/ean13.php" role="php" />
+ <file baseinstalldir="/" md5sum="c8f6ee291d82f2cba4f4adf6d2aac4ec" name="Image/Barcode2/int25.php" role="php" />
+ <file baseinstalldir="/" md5sum="52623b5e5442cebca2226027ef879deb" name="Image/Barcode2/postnet.php" role="php" />
+ <file baseinstalldir="/" md5sum="471c34e9a20cf1797ba2485579e25b09" name="Image/Barcode2/upca.php" role="php" />
+ <file baseinstalldir="/" md5sum="24fc56ca72d6362637db65025008d49f" name="README" role="data" />
</dir>
</contents>
<dependencies>
<required>
<php>
- <min>4.0.0</min>
+ <min>5.0.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
@@ -154,5 +156,21 @@ QA release
Bug #13794 Some numbers produce malformed &quot;UPC A&quot; barcodes
</notes>
</release>
+ <release>
+ <version>
+ <release>0.1.0</release>
+ <api>0.1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <date>2011-12-10</date>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+QA release
+Bug #13794 Some numbers produce malformed &quot;UPC A&quot; barcodes
+ </notes>
+ </release>
</changelog>
</package>

0 comments on commit a931a7d

Please sign in to comment.