public function mkdirWithInOrderKey($dir, $ttl = 0)
    {
        $data = array(
            'dir' => 'true'
        );

        if ($ttl) {
            $data['ttl'] = $ttl;
        }
        $request = $this->guzzleclient->post(
            $this->buildKeyUri($dir),
            null,
            $data
        );

        $response = $request->send();
        $body = $response->json();

        return $body;
    }
public function mkdirWithInOrderKey($dir, $ttl = 0)
    {
        $data = array(
            'dir' => 'true'
        );

        if ($ttl) {
            $data['ttl'] = $ttl;
        }
        $request = $this->guzzleclient->post(
            $this->buildKeyUri($dir),
            null,
            $data
        );

        $response = $request->send();
        $body = $response->json();

        return $body;
    }
public function mkdirWithInOrderKey ( $ dir , $ ttl = 0 ) { $ data = array ( 'dir' => 'true' ) ; if ( $ ttl ) { $ data [ 'ttl' ] = $ ttl ; } $ request = $ this -> guzzleclient -> post ( $ this -> buildKeyUri ( $ dir ) , null , $ data ) ; $ response = $ request -> send ( ) ; $ body = $ response -> json ( ) ; return $ body ; }
create a new directory with auto generated id

@param string $dir
@param int $ttl
@return array $body
create a new directory with auto generated id