Lines Matching refs:attributes

33     private $attributes;
41 public function __construct($attributes)
43 $this->attributes = $attributes;
52 if (!$this->attributes->type) {
55 elseif ($this->attributes->type == "QRCODE") {
59 elseif ($this->attributes->type == "DATAMATRIX") {
63 elseif (in_array($this->attributes->type, self::JUCKESARM_BARCODES)) {
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) {
80 $this->factory->setSize($this->attributes->size);
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);
98 if ($this->attributes->background_color) $styles[] = sprintf('background-color: #%s', $this->attributes->background_color);
101 if ($this->attributes->size) {
103 $styles[] = sprintf('width: %dpx', $this->attributes->size);
104 $styles[] = sprintf('height: %dpx', $this->attributes->size);
107 $styles[] = sprintf('height: %dpx', $this->attributes->size);
112 $styles[] = sprintf('padding: %dpx', $this->attributes->padding);
122 if ($this->attributes->img_type == 'svg') {
133 } elseif ($this->attributes->img_type == 'png') {
145 throw new BarcodesException('Unsupported img-type "' . $this->attributes->img_type . '"');