1 | <?php |
||
19 | class Ghostscript |
||
20 | { |
||
21 | /** |
||
22 | * The default binary |
||
23 | */ |
||
24 | const DEFAULT_BINARY = 'gs'; |
||
25 | |||
26 | /** |
||
27 | * The options |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $options; |
||
32 | |||
33 | /** |
||
34 | * The version |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $version; |
||
39 | |||
40 | /** |
||
41 | * Create Ghostscript object |
||
42 | * |
||
43 | * @param array $options |
||
44 | * |
||
45 | * @throws \RuntimeException |
||
46 | */ |
||
47 | 27 | public function __construct(array $options = []) |
|
55 | |||
56 | /** |
||
57 | * Get option |
||
58 | * |
||
59 | * @param string $name |
||
60 | * @param mixed $default |
||
61 | * |
||
62 | * @return mixed |
||
63 | */ |
||
64 | 24 | public function getOption($name, $default = null) |
|
72 | |||
73 | /** |
||
74 | * Create process builder object |
||
75 | * |
||
76 | * @param array $arguments |
||
77 | * |
||
78 | * @return ProcessBuilder |
||
79 | */ |
||
80 | 24 | protected function createProcessBuilder(array $arguments = []) |
|
88 | |||
89 | /** |
||
90 | * Get version |
||
91 | * |
||
92 | * @throws \RuntimeException |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 24 | public function getVersion() |
|
111 | |||
112 | /** |
||
113 | * Create process arguments object |
||
114 | * |
||
115 | * @param array $arguments |
||
116 | * |
||
117 | * @return ProcessArguments |
||
118 | */ |
||
119 | 6 | protected function createProcessArguments(array $arguments = []) |
|
130 | |||
131 | /** |
||
132 | * Create PDF device object |
||
133 | * |
||
134 | * @param null|string $outputFile |
||
135 | * |
||
136 | * @return PdfWrite |
||
137 | */ |
||
138 | 3 | public function createPdfDevice($outputFile = null) |
|
155 | } |
||
156 |