Permalink
Browse files

Add quick-n-dirty adapter

  • Loading branch information...
1 parent c42d970 commit d14c4c599a58c5fc975e21436f442d62e2d02c43 @CloCkWeRX CloCkWeRX committed Dec 11, 2011
Showing with 24 additions and 0 deletions.
  1. +24 −0 Image/Barcode2/Writer.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * An adapter for the non oo image writing code. Just used to
+ * create a seam for phpunit
+ *
+ * @todo See if there are other packages doing this already
+ */
+class Image_Barcode2_Writer {
+ public function imagestring($image, $font, $x, $y, $string, $color) {
+ return imagestring($image, $font, $x, $y, $string, $color;
+ }
+
+ public function imagefill($image, $x, $y, $color) {
+ return imagefill($image, $x, $y, $color);
+ }
+
+ public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) {
+ return imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color);
+ }
+
+ public function imagestring($image, $font, $x , $y, $string, $color) {
+ return imagestring($image, $font, $x , $y, $string, $color);
+ }
+}

0 comments on commit d14c4c5

Please sign in to comment.