GraphAware\Neo4j\Client\ClientBuilder::setMaster PHP Method

setMaster() public method

public setMaster ( string $connectionAlias )
$connectionAlias string
    public function setMaster($connectionAlias)
    {
        if (!isset($this->config['connections']) || !array_key_exists($connectionAlias, $this->config['connections'])) {
            throw new \InvalidArgumentException(sprintf('The connection "%s" is not registered', (string) $connectionAlias));
        }
        $this->config['connections'] = array_map(function ($connectionSettings) {
            $connectionSettings['is_master'] = false;
            return $connectionSettings;
        }, $this->config['connections']);
        $this->config['connections'][$connectionAlias]['is_master'] = true;
        return $this;
    }