You are here

public function PhantomJSCaptureHelper::getVersion in PhantomJS Capture 8

Return the version of PhantomJS binary on the server.

Return value

mixed

Overrides PhantomJSCaptureHelperInterface::getVersion

File

src/PhantomJSCaptureHelper.php, line 64

Class

PhantomJSCaptureHelper

Namespace

Drupal\phantomjs_capture

Code

public function getVersion() {
  $binary = $this->config
    ->get('binary');
  if ($this
    ->binaryExists($binary)) {
    $output = [];
    exec($binary . ' -v', $output);
    return $output[0];
  }
  return FALSE;
}