src/Console/ChromeDriverCommand.php
protected function extract($archive)
    {
        $zip = new ZipArchive;

        $zip->open($archive);

        $zip->extractTo($this->directory);

        $binary = $zip->getNameIndex(0);

        $zip->close();

        unlink($archive);

        return $binary;
    }
protected function extract($archive)
    {
        $zip = new ZipArchive;

        $zip->open($archive);

        $zip->extractTo($this->directory);

        $binary = $zip->getNameIndex(0);

        $zip->close();

        unlink($archive);

        return $binary;
    }
protected function extract ( $ archive ) { $ zip = new ZipArchive ; $ zip -> open ( $ archive ) ; $ zip -> extractTo ( $ this -> directory ) ; $ binary = $ zip -> getNameIndex ( 0 ) ; $ zip -> close ( ) ; unlink ( $ archive ) ; return $ binary ; }
Extract the ChromeDriver binary from the archive and delete the archive.

@param  string  $archive
@return string
Extract the ChromeDriver binary from the archive and delete the archive .