Lines Matching refs:attributes
58 // parse attributes
59 $attributes = new stdClass();
60 $attributes->type = strtoupper($barcode->attributes()['type']);
61 $attributes->value = strval($barcode->attributes()['value']);
62 $attributes->img_type = $barcode->attributes()['img-type'] ? strval($barcode->attributes()['img-type']) : $this->getConf('default_img_type');
63 $attributes->color = $barcode->attributes()['color'] ? Color::str2hex($barcode->attributes()['color']) : Color::str2hex($this->getConf('default_color'));
64 $attributes->background_color = $barcode->attributes()['background-color'] ? Color::str2hex($barcode->attributes()['background-color']) : ($this->getConf('default_background_color') ? Color::str2hex($this->getConf('default_background_color')) : null);
65 $attributes->size = preg_match('/^([0-9]+)(px)?$/', $barcode->attributes()['size'], $matches) ? intval($matches[1]) : null;
66 $attributes->scale = $barcode->attributes()['scale'] ? floatval($barcode->attributes()['scale']) : 1;
67 $attributes->padding = preg_match('/^([0-9]+)(px)?$/', $barcode->attributes()['padding'], $matches) ? intval($matches[1]) : $this->getConf('default_padding');
68 $attributes->logo = $barcode->attributes()['logo'] ? strval($barcode->attributes()['logo']) : null;
69 $data->attributes = $attributes;
86 $barcode = new BarcodesWrapper($data->attributes);