LinkORB\Component\Etcd\Client::setRoot PHP Method

setRoot() public method

$client->setRoot('/linkorb'); $client->set('key1, 'value1'); the new key is /linkorb/key1
public setRoot ( string $root ) : Client
$root string
return Client
    public function setRoot($root)
    {
        if (strpos('/', $root) === false) {
            $root = '/' . $root;
        }
        $this->root = rtrim($root, '/');
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 protected function tearDown()
 {
     $this->client->setRoot('/');
     $this->client->rmdir($this->dirname, true);
 }
All Usage Examples Of LinkORB\Component\Etcd\Client::setRoot