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

Method __construct

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

Source from the content-addressed store, hash-verified

36 public $bstream;
37
38 public function __construct($mode, $size, $data, $bstream = null)
39 {
40 $setData = array_slice($data, 0, $size);
41
42 if (count($setData) < $size) {
43 $setData = array_merge($setData, array_fill(0,$size-count($setData),0));
44 }
45
46 if(!QRinput::check($mode, $size, $setData)) {
47 throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData));
48 return null;
49 }
50
51 $this->mode = $mode;
52 $this->size = $size;
53 $this->data = $setData;
54 $this->bstream = $bstream;
55 }
56
57 //----------------------------------------------------------------------
58 public function encodeModeNum($version)

Callers

nothing calls this directly

Calls 2

countFunction · 0.85
checkMethod · 0.45

Tested by

no test coverage detected