mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-16 08:45:45 +00:00
:feelsgood:
This commit is contained in:
+9
-4
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Class Byte
|
||||
*
|
||||
* @filesource Byte.php
|
||||
* @created 25.11.2015
|
||||
@@ -18,7 +19,7 @@ use codemasher\QRCode\Data\QRDataInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Class Byte
|
||||
*
|
||||
*/
|
||||
class Byte extends QRDataBase implements QRDataInterface{
|
||||
|
||||
@@ -27,14 +28,18 @@ class Byte extends QRDataBase implements QRDataInterface{
|
||||
*/
|
||||
public $mode = QRConst::MODE_BYTE;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $lengthBits = [8, 16, 16];
|
||||
|
||||
/**
|
||||
* @param $buffer
|
||||
*/
|
||||
public function write(BitBuffer &$buffer){
|
||||
$len = strlen($this->data);
|
||||
for($i = 0; $i < $len; $i++){
|
||||
for($i = 0; $i < $this->dataLength; $i++){
|
||||
$buffer->put(ord($this->data[$i]), 8);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user