mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix the return type for Gender::country(), add an example, tinker with some
English, and remove the unneeded svn:mime-type property. Fixes doc bug #63373 (Mistake in documentation). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328254 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e4405eabb8
commit
94524f3aae
1 changed files with 42 additions and 13 deletions
|
@ -4,38 +4,67 @@
|
|||
<refentry xml:id="gender-gender.country" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>Gender\Gender::country</refname>
|
||||
<refpurpose>Get textual country representation.</refpurpose>
|
||||
<refpurpose>Get textual country representation</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>Gender\Gender::country</methodname>
|
||||
<modifier>public</modifier> <type>array</type><methodname>Gender\Gender::country</methodname>
|
||||
<methodparam><type>integer</type><parameter>country</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Get textual country representation from a Gender class constant.
|
||||
Returns the textual representation of a country from a Gender class
|
||||
constant.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>country</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Country id identified by Gender class constant.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>country</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A country ID specified by a <classname>Gender\Gender</classname> class
|
||||
constant.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array with the short and full names of the country on success
|
||||
&return.falseforfailure;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
Returns country name as string or false on failure.
|
||||
<example>
|
||||
<title>Using <methodname>Gender\Gender::country</methodname></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
$gender = new Gender\Gender;
|
||||
var_dump($gender->country(Gender\Gender::BRITAIN));
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(2) {
|
||||
'country_short' =>
|
||||
string(2) "UK"
|
||||
'country' =>
|
||||
string(13) "Great Britain"
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue