1<?php
2
3namespace jucksearm\barcode;
4
5use jucksearm\barcode\lib\QRcodeFactory;
6
7class QRcode
8{
9	public static function factory() {
10		return new QRcodeFactory();
11	}
12
13	public static function html(
14		$code,
15		$emblem = null,
16		$level = null,
17		$size = null,
18		$margin = null,
19		$color = null
20	) {
21		$qrcodeFactory = self::factory()
22		  ->setCode($code)
23		  ->setEmblem($emblem)
24		  ->setLevel($level)
25		  ->setSize($size)
26		  ->setMargin($margin)
27		  ->setColor($color)
28		  ->renderHTML();
29	}
30
31	public static function png(
32		$code,
33		$emblem = null,
34		$file = null,
35		$level = null,
36		$size = null,
37		$margin = null,
38		$color = null
39	) {
40		$qrcodeFactory = self::factory()
41		  ->setCode($code)
42		  ->setEmblem($emblem)
43		  ->setFile($file)
44		  ->setLevel($level)
45		  ->setSize($size)
46		  ->setMargin($margin)
47		  ->setColor($color)
48		  ->renderPNG();
49	}
50
51	public static function svg(
52		$code,
53		$emblem = null,
54		$file = null,
55		$level = null,
56		$size = null,
57		$margin = null,
58		$color = null
59	) {
60		$qrcodeFactory = self::factory()
61		  ->setCode($code)
62		  ->setEmblem($emblem)
63		  ->setFile($file)
64		  ->setLevel($level)
65		  ->setSize($size)
66		  ->setMargin($margin)
67		  ->setColor($color)
68		  ->renderSVG();
69	}
70}