PHP 클래스 SimpleSoftwareIO\QrCode\BaconQrCodeGenerator

상속: implements SimpleSoftwareIO\QrCode\QrCodeInterface
파일 보기 프로젝트 열기: simplesoftwareio/simple-qrcode 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$encoding string Holds the Encoder mode to encode a QrCode.
$errorCorrection BaconQrCode\Common\ErrorCorrectionLevel Holds the QrCode error correction levels. This is stored by using the BaconQrCode ErrorCorrectionLevel class constants.
$imageMerge null | string Holds an image string that will be merged with the QrCode.
$imagePercentage float The percentage that a merged image should take over the source image.
$writer BaconQrCode\Writer Holds the BaconQrCode Writer Object.

공개 메소드들

메소드 설명
__call ( $method, $arguments ) Creates a new datatype object and then generates a QrCode.
__construct ( BaconQrCode\Writer $writer = null, BaconQrCode\Renderer\Image\RendererInterface $format = null ) Creates a new QrCodeGenerator with a Writer class and with a SVG renderer set as the default.
backgroundColor ( integer $red, integer $green, integer $blue ) Changes the background color of a QrCode.
color ( integer $red, integer $green, integer $blue ) Changes the foreground color of a QrCode.
encoding ( string $encoding ) Sets the Encoding mode.
errorCorrection ( string $level ) Changes the error correction level of a QrCode.
format ( string $format ) Switches the format of the outputted QrCode or defaults to SVG.
generate ( string $text, null | string $filename = null ) : string | void Generates a QrCode.
margin ( integer $margin ) Creates a margin around the QrCode.
merge ( $filepath, $percentage = 0.2, $absolute = false ) Merges an image with the center of the QrCode.
mergeString ( $content, $percentage = 0.2 ) Merges an image string with the center of the QrCode, does not check for correct format.
size ( integer $pixels ) Changes the size of the QrCode.

비공개 메소드들

메소드 설명
createClass ( string $method ) : SimpleSoftwareIO\QrCode\DataTypes\DataTypeInterface Creates a new DataType class dynamically.
formatClass ( $method ) : string Formats the method name correctly.

메소드 상세

__call() 공개 메소드

Creates a new datatype object and then generates a QrCode.
public __call ( $method, $arguments )
$method
$arguments

__construct() 공개 메소드

Creates a new QrCodeGenerator with a Writer class and with a SVG renderer set as the default.
public __construct ( BaconQrCode\Writer $writer = null, BaconQrCode\Renderer\Image\RendererInterface $format = null )
$writer BaconQrCode\Writer
$format BaconQrCode\Renderer\Image\RendererInterface

backgroundColor() 공개 메소드

Changes the background color of a QrCode.
public backgroundColor ( integer $red, integer $green, integer $blue )
$red integer
$green integer
$blue integer

color() 공개 메소드

Changes the foreground color of a QrCode.
public color ( integer $red, integer $green, integer $blue )
$red integer
$green integer
$blue integer

encoding() 공개 메소드

Sets the Encoding mode.
public encoding ( string $encoding )
$encoding string

errorCorrection() 공개 메소드

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%

format() 공개 메소드

Switches the format of the outputted QrCode or defaults to SVG.
public format ( string $format )
$format string The desired format.

generate() 공개 메소드

Generates a QrCode.
public generate ( string $text, null | string $filename = null ) : string | void
$text string The text to be converted into a QrCode
$filename null | string The filename and path to save the QrCode file
리턴 string | void Returns a QrCode string depending on the format, or saves to a file.

margin() 공개 메소드

Creates a margin around the QrCode.
public margin ( integer $margin )
$margin integer The desired margin in pixels around the QrCode

merge() 공개 메소드

Merges an image with the center of the QrCode.
public merge ( $filepath, $percentage = 0.2, $absolute = false )
$filepath string The filepath to an image
$percentage float The amount that the merged image should be placed over the qrcode.
$absolute boolean Whether to use an absolute filepath or not.

mergeString() 공개 메소드

Merges an image string with the center of the QrCode, does not check for correct format.
public mergeString ( $content, $percentage = 0.2 )
$content string The string contents of an image.
$percentage float The amount that the merged image should be placed over the qrcode.

size() 공개 메소드

Changes the size of the QrCode.
public size ( integer $pixels )
$pixels integer The size of the QrCode in pixels

프로퍼티 상세

$encoding 보호되어 있는 프로퍼티

Holds the Encoder mode to encode a QrCode.
protected string $encoding
리턴 string

$errorCorrection 보호되어 있는 프로퍼티

Holds the QrCode error correction levels. This is stored by using the BaconQrCode ErrorCorrectionLevel class constants.
protected ErrorCorrectionLevel,BaconQrCode\Common $errorCorrection
리턴 BaconQrCode\Common\ErrorCorrectionLevel

$imageMerge 보호되어 있는 프로퍼티

Holds an image string that will be merged with the QrCode.
protected null|string $imageMerge
리턴 null | string

$imagePercentage 보호되어 있는 프로퍼티

The percentage that a merged image should take over the source image.
protected float $imagePercentage
리턴 float

$writer 보호되어 있는 프로퍼티

Holds the BaconQrCode Writer Object.
protected Writer,BaconQrCode $writer
리턴 BaconQrCode\Writer