PhantomInstaller\Installer::getURL PHP Method

getURL() public method

Returns the URL of the PhantomJS distribution for the installing OS.
public getURL ( string $version ) : string
$version string
return string Download URL
    public function getURL($version)
    {
        $file = false;
        $os = $this->getOS();
        $cdn_url = $this->getCdnUrl($version);
        if ($os === 'windows') {
            $file = 'phantomjs-' . $version . '-windows.zip';
        }
        if ($os === 'linux') {
            $bitsize = $this->getBitSize();
            if ($bitsize === '32') {
                $file = 'phantomjs-' . $version . '-linux-i686.tar.bz2';
            }
            if ($bitsize === '64') {
                $file = 'phantomjs-' . $version . '-linux-x86_64.tar.bz2';
            }
        }
        if ($os === 'macosx') {
            $file = 'phantomjs-' . $version . '-macosx.zip';
        }
        # OS unknown
        if ($file === false) {
            throw new \RuntimeException('The Installer could not select a PhantomJS package for this OS.
                Please install PhantomJS manually into the /bin folder of your project.');
        }
        return $cdn_url . $file;
    }