Lines Matching defs:factory
32 private $factory;
56 $this->factory = QRcode::factory();
57 $this->factory->setMargin(0);
60 $this->factory = Datamatrix::factory();
61 $this->factory->setMargin(0);
64 $this->factory = Barcode::factory();
65 $this->factory->setType($this->attributes->type);
72 $this->factory->setCode($this->attributes->value);
75 $this->factory->setColor($this->attributes->color);
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);
91 if ($this->factory instanceof QRcodeFactory) $this->factory->setEmblem($this->attributes->logo);
102 if ($this->factory instanceof QRcodeFactory || $this->factory instanceof DatamatrixFactory) {
106 elseif ($this->factory instanceof BarcodeFactory) {
123 if ($this->factory instanceof QRcodeFactory) {
124 $svg = $this->factory->getQRcodeSvgData();
125 } elseif ($this->factory instanceof DatamatrixFactory) {
126 $svg = $this->factory->getDatamatrixSvgData();
127 } elseif ($this->factory instanceof BarcodeFactory) {
128 $svg = $this->factory->getBarcodeSvgData();
130 throw new BarcodesException('BUG: Missing factory handler! Please open ticket!');
134 if ($this->factory instanceof QRcodeFactory) {
135 $png = $this->factory->getQRcodePngData();
136 } elseif ($this->factory instanceof DatamatrixFactory) {
137 $png = $this->factory->getDatamatrixPngData();
138 } elseif ($this->factory instanceof BarcodeFactory) {
139 $png = $this->factory->getBarcodePngData();
141 throw new BarcodesException('BUG: Missing factory handler! Please open ticket!');