/** * Downloads and decodes .htdeployment from the FTP server. * @return void */ private function loadDeploymentFile() { $tempFile = tempnam($this->tempDir, 'deploy'); try { $this->ftp->get($tempFile, $this->deploymentFile, Ftp::BINARY); } catch (FtpException $e) { return FALSE; } $content = gzinflate(file_get_contents($tempFile)); $res = array(); foreach (explode("\n", $content) as $item) { if (count($item = explode('=', $item, 2)) === 2) { $res[$item[1]] = $item[0]; } } return $res; }