transport = $transport; } /** * Check that $path exists. * * @param string $path * @return bool */ public function pathExists($path) { $url = $_ENV['app_frontend_url'] . self::URL . '?path=' . urlencode($path); $curl = $this->transport; $curl->write($url, [], CurlInterface::GET); $result = $curl->read(); $curl->close(); return strpos($result, 'path exists: true') !== false; } }