MCPcopy Create free account
hub / github.com/codemistic/Web-Development / __construct

Method __construct

text-to-qr/lib/phpqrcode/phpqrcode.php:1051–1068  ·  view source on GitHub ↗
($mode, $size, $data, $bstream = null)

Source from the content-addressed store, hash-verified

1049 public $bstream;
1050
1051 public function __construct($mode, $size, $data, $bstream = null)
1052 {
1053 $setData = array_slice($data, 0, $size);
1054
1055 if (count($setData) < $size) {
1056 $setData = array_merge($setData, array_fill(0,$size-count($setData),0));
1057 }
1058
1059 if(!QRinput::check($mode, $size, $setData)) {
1060 throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData));
1061 return null;
1062 }
1063
1064 $this->mode = $mode;
1065 $this->size = $size;
1066 $this->data = $setData;
1067 $this->bstream = $bstream;
1068 }
1069
1070 //----------------------------------------------------------------------
1071 public function encodeModeNum($version)

Callers

nothing calls this directly

Calls 2

countFunction · 0.85
checkMethod · 0.45

Tested by

no test coverage detected