Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add quick-n-dirty adapter

  • Loading branch information...
commit d14c4c599a58c5fc975e21436f442d62e2d02c43 1 parent c42d970
Daniel O'Connor CloCkWeRX authored

Showing 1 changed file with 24 additions and 0 deletions. Show diff stats Hide diff stats

  1. +24 0 Image/Barcode2/Writer.php
24 Image/Barcode2/Writer.php
... ... @@ -0,0 +1,24 @@
  1 +<?php
  2 +/**
  3 + * An adapter for the non oo image writing code. Just used to
  4 + * create a seam for phpunit
  5 + *
  6 + * @todo See if there are other packages doing this already
  7 + */
  8 +class Image_Barcode2_Writer {
  9 + public function imagestring($image, $font, $x, $y, $string, $color) {
  10 + return imagestring($image, $font, $x, $y, $string, $color;
  11 + }
  12 +
  13 + public function imagefill($image, $x, $y, $color) {
  14 + return imagefill($image, $x, $y, $color);
  15 + }
  16 +
  17 + public function imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) {
  18 + return imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color);
  19 + }
  20 +
  21 + public function imagestring($image, $font, $x , $y, $string, $color) {
  22 + return imagestring($image, $font, $x , $y, $string, $color);
  23 + }
  24 +}

0 comments on commit d14c4c5

Please sign in to comment.
Something went wrong with that request. Please try again.