mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Last minute changes in the return document :]
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328207 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e4dc3d9c4b
commit
24e0d9472e
1 changed files with 189 additions and 73 deletions
|
@ -62,7 +62,32 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The result of the aggregation as an array.
|
||||
The result of the aggregation as an array. The <varname>ok</varname> will
|
||||
be set to <literal>1</literal> on success, <literal>0</literal> on failure.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
When an error occurs an array with the following keys will be returned:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<varname>errmsg</varname> - containing the reason for the failure
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<varname>code</varname> - the errorcode of the failure
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<varname>ok</varname> - will be set to 0.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -126,32 +151,37 @@ var_dump($results);
|
|||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
[0]=>
|
||||
["result"]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
array(1) {
|
||||
["tags"]=>
|
||||
string(4) "good"
|
||||
[0]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
array(1) {
|
||||
["tags"]=>
|
||||
string(4) "good"
|
||||
}
|
||||
["authors"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "bob"
|
||||
}
|
||||
}
|
||||
["authors"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "bob"
|
||||
}
|
||||
}
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
array(1) {
|
||||
["tags"]=>
|
||||
string(3) "fun"
|
||||
}
|
||||
["authors"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "bob"
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
array(1) {
|
||||
["tags"]=>
|
||||
string(3) "fun"
|
||||
}
|
||||
["authors"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(3) "bob"
|
||||
}
|
||||
}
|
||||
}
|
||||
["ok"]=>
|
||||
float(1)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
|
@ -191,29 +221,61 @@ var_dump($out);
|
|||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(7) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "TX"
|
||||
["totalPop"]=>
|
||||
int(16986510)
|
||||
}
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "PA"
|
||||
["totalPop"]=>
|
||||
int(11881643)
|
||||
}
|
||||
....
|
||||
[6]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "FL"
|
||||
["totalPop"]=>
|
||||
int(12937926)
|
||||
array(2) {
|
||||
["result"]=>
|
||||
array(7) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "TX"
|
||||
["totalPop"]=>
|
||||
int(16986510)
|
||||
}
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "PA"
|
||||
["totalPop"]=>
|
||||
int(11881643)
|
||||
}
|
||||
[2]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "NY"
|
||||
["totalPop"]=>
|
||||
int(17990455)
|
||||
}
|
||||
[3]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "IL"
|
||||
["totalPop"]=>
|
||||
int(11430602)
|
||||
}
|
||||
[4]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "CA"
|
||||
["totalPop"]=>
|
||||
int(29760021)
|
||||
}
|
||||
[5]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "OH"
|
||||
["totalPop"]=>
|
||||
int(10847115)
|
||||
}
|
||||
[6]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "FL"
|
||||
["totalPop"]=>
|
||||
int(12937926)
|
||||
}
|
||||
}
|
||||
["ok"]=>
|
||||
float(1)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
|
@ -252,36 +314,90 @@ var_dump($out);
|
|||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(51) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "DC"
|
||||
["avgCityPop"]=>
|
||||
float(303450)
|
||||
}
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "DE"
|
||||
["avgCityPop"]=>
|
||||
float(14481.913043478)
|
||||
}
|
||||
array(2) {
|
||||
["result"]=>
|
||||
array(51) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "DC"
|
||||
["avgCityPop"]=>
|
||||
float(303450)
|
||||
}
|
||||
[1]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "DE"
|
||||
["avgCityPop"]=>
|
||||
float(14481.913043478)
|
||||
}
|
||||
[2]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "RI"
|
||||
["avgCityPop"]=>
|
||||
float(18933.283018868)
|
||||
}
|
||||
[3]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "AL"
|
||||
["avgCityPop"]=>
|
||||
float(7907.2152641879)
|
||||
}
|
||||
[4]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "NH"
|
||||
["avgCityPop"]=>
|
||||
float(5232.320754717)
|
||||
}
|
||||
...
|
||||
[49]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "WI"
|
||||
["avgCityPop"]=>
|
||||
float(7323.0074850299)
|
||||
}
|
||||
[50]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "WV"
|
||||
["avgCityPop"]=>
|
||||
float(2759.1953846154)
|
||||
[45]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "WY"
|
||||
["avgCityPop"]=>
|
||||
float(3359.9111111111)
|
||||
}
|
||||
[46]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "MN"
|
||||
["avgCityPop"]=>
|
||||
float(5335.4865853659)
|
||||
}
|
||||
[47]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "OK"
|
||||
["avgCityPop"]=>
|
||||
float(6155.7436399217)
|
||||
}
|
||||
[48]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "IL"
|
||||
["avgCityPop"]=>
|
||||
float(9931.0182450043)
|
||||
}
|
||||
[49]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "WI"
|
||||
["avgCityPop"]=>
|
||||
float(7323.0074850299)
|
||||
}
|
||||
[50]=>
|
||||
array(2) {
|
||||
["_id"]=>
|
||||
string(2) "WV"
|
||||
["avgCityPop"]=>
|
||||
float(2759.1953846154)
|
||||
}
|
||||
}
|
||||
["ok"]=>
|
||||
float(1)
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
|
|
Loading…
Reference in a new issue