mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-12 18:56:31 +00:00
:octocat: HTML: less bloat
This commit is contained in:
@@ -56,10 +56,10 @@ class QRMarkup extends QROutputAbstract{
|
||||
* @return string
|
||||
*/
|
||||
protected function html():string{
|
||||
$html = '';
|
||||
$html = '<div class="'.$this->options->cssClass.'">'.$this->options->eol;
|
||||
|
||||
foreach($this->matrix->matrix() as $row){
|
||||
$html .= '<div'.($this->options->cssClass ? 'class="'.$this->options->cssClass.'"' : '').'>';
|
||||
$html .= '<div>';
|
||||
|
||||
foreach($row as $M_TYPE){
|
||||
$html .= '<span style="background: '.$this->moduleValues[$M_TYPE].';"></span>';
|
||||
@@ -68,6 +68,8 @@ class QRMarkup extends QROutputAbstract{
|
||||
$html .= '</div>'.$this->options->eol;
|
||||
}
|
||||
|
||||
$html .= '</div>'.$this->options->eol;
|
||||
|
||||
if($this->options->cachefile){
|
||||
return '<!DOCTYPE html><head><meta charset="UTF-8"></head><body>'.$this->options->eol.$html.'</body>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user