Lines Matching refs:this

43         $this->attributes = $attributes;
44 $this->applyAttributes();
52 if (!$this->attributes->type) {
55 elseif ($this->attributes->type == "QRCODE") {
56 $this->factory = QRcode::factory();
57 $this->factory->setMargin(0);
59 elseif ($this->attributes->type == "DATAMATRIX") {
60 $this->factory = Datamatrix::factory();
61 $this->factory->setMargin(0);
63 elseif (in_array($this->attributes->type, self::JUCKESARM_BARCODES)) {
64 $this->factory = Barcode::factory();
65 $this->factory->setType($this->attributes->type);
68 throw new BarcodesException('unsupported type "' . $this->attributes->type . '"');
72 $this->factory->setCode($this->attributes->value);
75 $this->factory->setColor($this->attributes->color);
78 if ($this->attributes->size) {
79 … if ($this->factory instanceof QRcodeFactory || $this->factory instanceof DatamatrixFactory) {
80 $this->factory->setSize($this->attributes->size);
82 elseif ($this->factory instanceof BarcodeFactory) {
83 $this->factory->setHeight($this->attributes->size);
88 … if ($this->factory instanceof BarcodeFactory) $this->factory->setScale($this->attributes->scale);
95 …if ($this->attributes->background_color) $styles[] = sprintf('background-color: #%s', $this->attri…
98 if ($this->attributes->size) {
99 … if ($this->factory instanceof QRcodeFactory || $this->factory instanceof DatamatrixFactory) {
100 $styles[] = sprintf('width: %dpx', $this->attributes->size);
101 $styles[] = sprintf('height: %dpx', $this->attributes->size);
103 elseif ($this->factory instanceof BarcodeFactory) {
104 $styles[] = sprintf('height: %dpx', $this->attributes->size);
109 $styles[] = sprintf('padding: %dpx', $this->attributes->padding);
119 if ($this->attributes->img_type == 'svg') {
120 if ($this->factory instanceof QRcodeFactory) {
121 $svg = $this->factory->getQRcodeSvgData();
122 } elseif ($this->factory instanceof DatamatrixFactory) {
123 $svg = $this->factory->getDatamatrixSvgData();
124 } elseif ($this->factory instanceof BarcodeFactory) {
125 $svg = $this->factory->getBarcodeSvgData();
130 } elseif ($this->attributes->img_type == 'png') {
131 if ($this->factory instanceof QRcodeFactory) {
132 $png = $this->factory->getQRcodePngData();
133 } elseif ($this->factory instanceof DatamatrixFactory) {
134 $png = $this->factory->getDatamatrixPngData();
135 } elseif ($this->factory instanceof BarcodeFactory) {
136 $png = $this->factory->getBarcodePngData();
142 … throw new BarcodesException('Unsupported img-type "' . $this->attributes->img_type . '"');
147 return '<img style="' . $this->getStyle() . '" src="' . $this->getImgSrc() . '" />';