transport = $transport; } /** * Creates Website folder in root directory. * * @param string $websiteCode * @throws \Exception */ public function create($websiteCode) { $curl = $this->transport; $curl->addOption(CURLOPT_HEADER, 1); $curl->write($this->prepareUrl($websiteCode), [], CurlInterface::GET); $curl->read(); $curl->close(); } /** * Prepare url. * * @param string $websiteCode * @return string */ private function prepareUrl($websiteCode) { return $_ENV['app_frontend_url'] . self::URL . '?website_code=' . urlencode($websiteCode); } }