PHP 클래스 Endroid\QrCode\QrCode

파일 보기 프로젝트 열기: endroid/qrcode 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$color_background array
$color_foreground array
$draw_border boolean
$draw_quiet_zone boolean
$error_correction integer
$error_corrections_available array
$image resource
$image_path string
$image_type string
$image_types_available array
$label string
$label_font_path string
$label_font_size integer
$label_halign integer
$label_valign integer
$logo string
$logo_size
$module_size integer
$padding integer
$path string
$size integer
$structure_append_m integer
$structure_append_n integer
$structure_append_original_data string
$structure_append_parity integer
$text string
$version integer

공개 메소드들

메소드 설명
__construct ( string $text = '' ) Class constructor.
create ( ) Create the image.
get ( string | null $format = null ) : string Create QR Code and return its content.
getBackgroundColor ( ) : array Return background color of the QR Code.
getContentType ( ) : string Returns the content type corresponding to the image type.
getDataUri ( ) : string Return the data URI.
getDrawBorder ( ) : boolean Return draw border around QR Code.
getDrawQuietZone ( ) : boolean Return draw required four-module wide margin.
getErrorCorrection ( ) : integer Return QR Code error correction level.
getForegroundColor ( ) : array Return foreground color of the QR Code.
getImage ( ) : resource Return the image resource.
getImagePath ( ) : string Return path to the images directory.
getImageType ( ) : string Return image type for rendering.
getLabel ( ) : string Return QR Code label (text).
getLabelFontPath ( ) : string Return path to the QR Code label's TTF font file.
getLabelFontSize ( ) : integer Return QR Code label font size.
getLabelHalign ( ) : integer Return label horizontal alignment.
getLabelValign ( ) : integer Return label vertical alignment.
getModuleSize ( ) : integer Return QR Code module size.
getPadding ( ) : integer Return padding around the QR Code.
getPath ( ) : string Return path to the data directory.
getSize ( ) : integer Return QR Code size (width).
getText ( ) : string Return text that will be hid in QR Code.
getVersion ( ) : integer Return QR Code version.
render ( null | string $filename = null, null | string $format = 'png' ) : QrCode Render the QR Code then save it to given file name or output it to the browser when file name omitted.
save ( string $filename ) : QrCode Render the QR Code then save it to given file name.
setBackgroundColor ( array $color_background ) : QrCode Set background color of the QR Code.
setDrawBorder ( boolean $draw_border ) : QrCode Set draw border around QR Code.
setDrawQuietZone ( boolean $draw_quiet_zone ) : QrCode Set draw required four-module wide margin.
setErrorCorrection ( mixed $error_correction ) : QrCode Set QR Code error correction level.
setExtension ( string $extension ) : QrCode Set image type for rendering via extension.
setForegroundColor ( array $color_foreground ) : QrCode Set foreground color of the QR Code.
setImagePath ( string $image_path ) : QrCode Set path to the images directory.
setImageType ( string $image_type ) : QrCode Set image type for rendering.
setLabel ( integer | string $label ) : QrCode Set QR Code label (text).
setLabelFontPath ( integer $label_font_path ) : QrCode Set QR Code label font path.
setLabelFontSize ( integer $label_font_size ) : QrCode Set QR Code label font size.
setLabelHalign ( integer $label_halign ) : QrCode Set label horizontal alignment.
setLabelValign ( integer $label_valign ) : QrCode Set label vertical alignment.
setLogo ( string $logo ) : QrCode Set logo in QR Code.
setLogoSize ( integer $logo_size ) : QrCode Set logo size in QR Code(default 48).
setModuleSize ( integer $module_size ) : QrCode Set QR Code module size.
setPadding ( integer $padding ) : QrCode Set padding around the QR Code.
setPath ( string $path ) : QrCode Set path to the data directory.
setSize ( integer $size ) : QrCode Set QR Code size (width).
setStructureAppend ( integer $n, integer $m, integer $parity, string $original_data ) : QrCode Set structure append.
setText ( string $text ) : QrCode Set text to hide in QR Code.
setVersion ( integer $version ) : QrCode Set QR Code version.

메소드 상세

__construct() 공개 메소드

Class constructor.
public __construct ( string $text = '' )
$text string

create() 공개 메소드

Create the image.
public create ( )

get() 공개 메소드

Create QR Code and return its content.
public get ( string | null $format = null ) : string
$format string | null Image type (gif, png, wbmp, jpeg)
리턴 string

getBackgroundColor() 공개 메소드

Return background color of the QR Code.
public getBackgroundColor ( ) : array
리턴 array

getContentType() 공개 메소드

Returns the content type corresponding to the image type.
public getContentType ( ) : string
리턴 string

getDataUri() 공개 메소드

Return the data URI.
public getDataUri ( ) : string
리턴 string

getDrawBorder() 공개 메소드

Return draw border around QR Code.
public getDrawBorder ( ) : boolean
리턴 boolean

getDrawQuietZone() 공개 메소드

Return draw required four-module wide margin.
public getDrawQuietZone ( ) : boolean
리턴 boolean

getErrorCorrection() 공개 메소드

Return QR Code error correction level.
public getErrorCorrection ( ) : integer
리턴 integer

getForegroundColor() 공개 메소드

Return foreground color of the QR Code.
public getForegroundColor ( ) : array
리턴 array

getImage() 공개 메소드

Return the image resource.
public getImage ( ) : resource
리턴 resource

getImagePath() 공개 메소드

Return path to the images directory.
public getImagePath ( ) : string
리턴 string

getImageType() 공개 메소드

Return image type for rendering.
public getImageType ( ) : string
리턴 string

getLabel() 공개 메소드

Return QR Code label (text).
public getLabel ( ) : string
리턴 string

getLabelFontPath() 공개 메소드

Return path to the QR Code label's TTF font file.
public getLabelFontPath ( ) : string
리턴 string

getLabelFontSize() 공개 메소드

Return QR Code label font size.
public getLabelFontSize ( ) : integer
리턴 integer

getLabelHalign() 공개 메소드

Return label horizontal alignment.
public getLabelHalign ( ) : integer
리턴 integer

getLabelValign() 공개 메소드

Return label vertical alignment.
public getLabelValign ( ) : integer
리턴 integer

getModuleSize() 공개 메소드

Return QR Code module size.
public getModuleSize ( ) : integer
리턴 integer

getPadding() 공개 메소드

Return padding around the QR Code.
public getPadding ( ) : integer
리턴 integer

getPath() 공개 메소드

Return path to the data directory.
public getPath ( ) : string
리턴 string

getSize() 공개 메소드

Return QR Code size (width).
public getSize ( ) : integer
리턴 integer

getText() 공개 메소드

Return text that will be hid in QR Code.
public getText ( ) : string
리턴 string

getVersion() 공개 메소드

Return QR Code version.
public getVersion ( ) : integer
리턴 integer

render() 공개 메소드

Render the QR Code then save it to given file name or output it to the browser when file name omitted.
public render ( null | string $filename = null, null | string $format = 'png' ) : QrCode
$filename null | string File name of the QR Code
$format null | string Format of the file (png, jpeg, jpg, gif, wbmp)
리턴 QrCode

save() 공개 메소드

Render the QR Code then save it to given file name.
public save ( string $filename ) : QrCode
$filename string File name of the QR Code
리턴 QrCode

setBackgroundColor() 공개 메소드

Set background color of the QR Code.
public setBackgroundColor ( array $color_background ) : QrCode
$color_background array RGB color
리턴 QrCode

setDrawBorder() 공개 메소드

Set draw border around QR Code.
public setDrawBorder ( boolean $draw_border ) : QrCode
$draw_border boolean State of border drawing
리턴 QrCode

setDrawQuietZone() 공개 메소드

Set draw required four-module wide margin.
public setDrawQuietZone ( boolean $draw_quiet_zone ) : QrCode
$draw_quiet_zone boolean State of required four-module wide margin drawing
리턴 QrCode

setErrorCorrection() 공개 메소드

Set QR Code error correction level.
public setErrorCorrection ( mixed $error_correction ) : QrCode
$error_correction mixed Error Correction Level
리턴 QrCode

setExtension() 공개 메소드

Set image type for rendering via extension.
public setExtension ( string $extension ) : QrCode
$extension string Image extension
리턴 QrCode

setForegroundColor() 공개 메소드

Set foreground color of the QR Code.
public setForegroundColor ( array $color_foreground ) : QrCode
$color_foreground array RGB color
리턴 QrCode

setImagePath() 공개 메소드

Set path to the images directory.
public setImagePath ( string $image_path ) : QrCode
$image_path string Image directory
리턴 QrCode

setImageType() 공개 메소드

Set image type for rendering.
public setImageType ( string $image_type ) : QrCode
$image_type string Image type
리턴 QrCode

setLabel() 공개 메소드

Set QR Code label (text).
public setLabel ( integer | string $label ) : QrCode
$label integer | string Label to print under QR code
리턴 QrCode

setLabelFontPath() 공개 메소드

Set QR Code label font path.
public setLabelFontPath ( integer $label_font_path ) : QrCode
$label_font_path integer Path to the QR Code label's TTF font file
리턴 QrCode

setLabelFontSize() 공개 메소드

Set QR Code label font size.
public setLabelFontSize ( integer $label_font_size ) : QrCode
$label_font_size integer Font size of the QR code label
리턴 QrCode

setLabelHalign() 공개 메소드

Set label horizontal alignment.
public setLabelHalign ( integer $label_halign ) : QrCode
$label_halign integer Label horizontal alignment
리턴 QrCode

setLabelValign() 공개 메소드

Set label vertical alignment.
public setLabelValign ( integer $label_valign ) : QrCode
$label_valign integer Label vertical alignment
리턴 QrCode

setLogoSize() 공개 메소드

Set logo size in QR Code(default 48).
public setLogoSize ( integer $logo_size ) : QrCode
$logo_size integer Logo Size
리턴 QrCode

setModuleSize() 공개 메소드

Set QR Code module size.
public setModuleSize ( integer $module_size ) : QrCode
$module_size integer Module size
리턴 QrCode

setPadding() 공개 메소드

Set padding around the QR Code.
public setPadding ( integer $padding ) : QrCode
$padding integer Padding around QR Code
리턴 QrCode

setPath() 공개 메소드

Set path to the data directory.
public setPath ( string $path ) : QrCode
$path string Data directory
리턴 QrCode

setSize() 공개 메소드

Set QR Code size (width).
public setSize ( integer $size ) : QrCode
$size integer Width of the QR Code
리턴 QrCode

setStructureAppend() 공개 메소드

Set structure append.
public setStructureAppend ( integer $n, integer $m, integer $parity, string $original_data ) : QrCode
$n integer
$m integer
$parity integer Parity
$original_data string Original data
리턴 QrCode

setText() 공개 메소드

Set text to hide in QR Code.
public setText ( string $text ) : QrCode
$text string Text to hide
리턴 QrCode

setVersion() 공개 메소드

Set QR Code version.
public setVersion ( integer $version ) : QrCode
$version integer QR Code version
리턴 QrCode

프로퍼티 상세

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

protected array $color_background
리턴 array

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

protected array $color_foreground
리턴 array

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

protected bool $draw_border
리턴 boolean

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

protected bool $draw_quiet_zone
리턴 boolean

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

protected int $error_correction
리턴 integer

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

protected array $error_corrections_available
리턴 array

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

protected resource $image
리턴 resource

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

protected string $image_path
리턴 string

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

protected string $image_type
리턴 string

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

protected array $image_types_available
리턴 array

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

protected string $label
리턴 string

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

protected string $label_font_path
리턴 string

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

protected int $label_font_size
리턴 integer

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

protected int $label_halign
리턴 integer

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

protected int $label_valign
리턴 integer

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

protected $logo_size

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

protected int $module_size
리턴 integer

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

protected int $padding
리턴 integer

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

protected string $path
리턴 string

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

protected int $size
리턴 integer

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

protected int $structure_append_m
리턴 integer

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

protected int $structure_append_n
리턴 integer

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

protected string $structure_append_original_data
리턴 string

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

protected int $structure_append_parity
리턴 integer

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

protected string $text
리턴 string

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

protected int $version
리턴 integer