File tree Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,7 @@ while(true) {
58
58
]]>
59
59
</programlisting >
60
60
</example >
61
- </refsect1 >
62
61
63
- <refsect1 role =" examples" >
64
- &reftitle.examples;
65
62
<example xml : id =" function.zookeeper-dispatch.example.2" >
66
63
<title ><methodname >zookeeper_dispatch</methodname > example #2</title >
67
64
<para >
Original file line number Diff line number Diff line change @@ -103,6 +103,53 @@ else
103
103
<screen >
104
104
<![CDATA[
105
105
nodevalue
106
+ ]]>
107
+ </screen >
108
+ </example >
109
+
110
+ <example xml : id =" zookeeper.get.example.stat" >
111
+ <title ><methodname >Zookeeper::get</methodname > stat example</title >
112
+ <para >
113
+ Get node stat info.
114
+ </para >
115
+ <programlisting role =" php" >
116
+ <![CDATA[
117
+ <?php
118
+ $zookeeper = new Zookeeper('localhost:2181');
119
+ $path = '/path/to/node';
120
+ $stat = [];
121
+ $zookeeper->get($path, null, $stat);
122
+ var_dump($stat);
123
+ ?>
124
+ ]]>
125
+ </programlisting >
126
+ &example.outputs;
127
+ <screen >
128
+ <![CDATA[
129
+ array(11) {
130
+ ["czxid"]=>
131
+ float(0)
132
+ ["mzxid"]=>
133
+ float(0)
134
+ ["ctime"]=>
135
+ float(0)
136
+ ["mtime"]=>
137
+ float(0)
138
+ ["version"]=>
139
+ int(0)
140
+ ["cversion"]=>
141
+ int(-2)
142
+ ["aversion"]=>
143
+ int(0)
144
+ ["ephemeralOwner"]=>
145
+ float(0)
146
+ ["dataLength"]=>
147
+ int(0)
148
+ ["numChildren"]=>
149
+ int(2)
150
+ ["pzxid"]=>
151
+ float(0)
152
+ }
106
153
]]>
107
154
</screen >
108
155
</example >
You can’t perform that action at this time.
0 commit comments