getQrPadding() public method

Gets the padding, in pixels, around a generated QR code
public getQrPadding ( ) : integer
return integer
Beispiel #1
0
 public function render($outputFile)
 {
     $qrCode = new QrCode();
     $qrCode->setText($this->getUrl());
     $qrCode->setSize($this->configuration->getQrHeight());
     $qrCode->setPadding($this->configuration->getQrPadding());
     $qrCode->render($outputFile);
 }
 public function testLoadsFullJsonConfig()
 {
     $obj = new SqrlConfiguration();
     $obj->load(__DIR__ . '/Resources/allOptional.json');
     $this->assertEquals(array(1), $obj->getAcceptedVersions());
     $this->assertEquals('otherdomain.com', $obj->getDomain());
     $this->assertEquals('sqrl.php', $obj->getAuthenticationPath());
     $this->assertEquals('My Example Server', $obj->getFriendlyName());
     $this->assertTrue($obj->getSecure());
     $this->assertTrue($obj->getAnonAllowed());
     $this->assertEquals(9, $obj->getNonceMaxAge());
     $this->assertEquals(250, $obj->getQrHeight());
     $this->assertEquals(5, $obj->getQrPadding());
     $this->assertEquals('gibberish data', $obj->getNonceSalt());
 }