tad\WPBrowser\Connector\WordPress::setRootFolder PHP Method

setRootFolder() public method

public setRootFolder ( string $rootFolder )
$rootFolder string
    public function setRootFolder($rootFolder)
    {
        if (!is_dir($rootFolder)) {
            throw new \InvalidArgumentException('Root folder [' . $rootFolder . '] is not an existing folder!');
        }
        $this->rootFolder = $rootFolder;
        $this->uriToIndexMapper->setRoot($rootFolder);
    }

Usage Example

Example #1
0
 private function setupClient($siteDomain)
 {
     $this->client = $this->client ? $this->client : new WordPressConnector();
     $this->client->setUrl($this->siteUrl);
     $this->client->setDomain($siteDomain);
     $this->client->setRootFolder($this->config['wpRootFolder']);
     $this->client->followRedirects(true);
     $this->client->resetCookies();
     $this->setCookiesFromOptions();
 }