SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::errorCorrection PHP Method

errorCorrection() public method

Changes the error correction level of a QrCode.
public errorCorrection ( string $level )
$level string Desired error correction level. L = 7% M = 15% Q = 25% H = 30%
    public function errorCorrection($level)
    {
        $this->errorCorrection = constant("BaconQrCode\\Common\\ErrorCorrectionLevel::{$level}");
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Changes the error correction level of a QrCode
  *
  * @param string $level Desired error correction level.  L = 7% M = 15% Q = 25% H = 30%
  * @return $this 
  * @static 
  */
 public static function errorCorrection($level)
 {
     return \SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::errorCorrection($level);
 }