We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1ccc00 commit ce9a5d8Copy full SHA for ce9a5d8
src/Capture.php
@@ -177,6 +177,20 @@ private function getTemplateResult($templateName, array $args)
177
return ob_get_clean();
178
}
179
180
+ /**
181
+ * Sets the path to PhantomJS binary, example: "/usr/bin"
182
+ *
183
+ * @param string $path
184
+ */
185
+ public function setBinPath($binPath)
186
+ {
187
+ $binPath = rtrim($binPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
188
+ if (!file_exists($binPath . 'phantomjs') && !file_exists($binPath . 'phantomjs.exe')) {
189
+ throw new \Exception("Bin directory should contain phantomjs or phantomjs.exe file!");
190
+ }
191
+ $this->binPath = $binPath;
192
193
+
194
/**
195
* Sets the url to screenshot
196
*
0 commit comments