cvs: phpdoc-kr / language-defs.ent /reference/apache/functions apache-child-terminate.xml apache-note.xml apache-response-headers.xml
getallheaders.xml virtual.xml /reference/array/functions count.xml

From: Date: Sun, 09 Nov 2008 17:34:25 +0000
Subject: cvs: phpdoc-kr / language-defs.ent /reference/apache/functions apache-child-terminate.xml apache-note.xml apache-response-headers.xml
getallheaders.xml virtual.xml /reference/array/functions count.xml
Groups: php.doc.kr 
Request: Send a blank email to doc-kr+get-755@lists.php.net to get a copy of this message
progcom Sun Nov 9 17:34:25 2008 UTC Modified files: /phpdoc-kr language-defs.ent /phpdoc-kr/reference/apache/functions apache-child-terminate.xml apache-note.xml apache-response-headers.xml getallheaders.xml virtual.xml /phpdoc-kr/reference/array/functions count.xml Log: update some old files

http://cvs.php.net/viewvc.cgi/phpdoc-kr/language-defs.ent?r1=1.30&r2=1.31&diff_format=u Index: phpdoc-kr/language-defs.ent diff -u phpdoc-kr/language-defs.ent:1.30 phpdoc-kr/language-defs.ent:1.31 --- phpdoc-kr/language-defs.ent:1.30 Sun Nov 9 07:37:42 2008 +++ phpdoc-kr/language-defs.ent Sun Nov 9 17:34:25 2008 @@ -83,7 +83,7 @@ <!ENTITY reftitle.notes '<title>주의</title>'> <!ENTITY reftitle.parameters '<title>매개변수</title>'> <!ENTITY reftitle.options '<title>옵션</title>'> -<!ENTITY reftitle.properties '<title>속성</title>'> +<!ENTITY reftitle.properties '<title>프로퍼티</title>'> <!ENTITY reftitle.required '<title>요구 조건</title>'> <!ENTITY reftitle.resources '<title>자원형</title>'> <!ENTITY reftitle.runtime '<title>실행시 설정</title>'> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/apache/functions/apache-child-terminate.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/apache/functions/apache-child-terminate.xml diff -u phpdoc-kr/reference/apache/functions/apache-child-terminate.xml:1.4 phpdoc-kr/reference/apache/functions/apache-child-terminate.xml:1.5 --- phpdoc-kr/reference/apache/functions/apache-child-terminate.xml:1.4 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/apache/functions/apache-child-terminate.xml Sun Nov 9 17:34:25 2008 @@ -1,39 +1,50 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.5 Maintainer: progcom Status: ready --> - <refentry xml:id="function.apache-child-terminate" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>apache_child_terminate</refname> - <refpurpose>이 요청 후에 아파치 프로세스를 종료한다.</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>bool</type><methodname>apache_child_terminate</methodname> - <void/> - </methodsynopsis> - <para> - <function>apache_child_terminate</function>는 PHP 코드의 실행이 끝났을 - 때 프로세스를 종료시키기 위하여 현재 PHP 요청을 실행하는 아파치 프로세스를 - 등록합니다. 보통 메모리는 내부적으로 사용할 수 있게 해제되지만, 운영 체계에 - 반환되지 않기 때문에 많은 메모리를 소모하는 스크립트를 실행한 후에 - 프로세스를 종료시키기 위해서 사용됩니다. - </para> - <note> - <simpara> - 이 기능은 &php.ini;에서 지시어 <option>apache.child_terminate</option>를 - 통해서 유효화 할 수 있습니다. 기본값은 <literal>off</literal>입니다. - </simpara> - <simpara> - 이 기능은 아파치의 win32 버전 같은 멀티쓰레드(multithread) 버전에서는 - 사용할 수 없습니다. - </simpara> - </note> - <para> - 참고: <function>exit</function>. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.10 Maintainer: progcom Status: ready --> +<refentry xml:id="function.apache-child-terminate" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>apache_child_terminate</refname> + <refpurpose>이 요청 후에 아파치 프로세스를 종료한다.</refpurpose> + </refnamediv> + + <refsect1 sole="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>apache_child_terminate</methodname> + <void/> + </methodsynopsis> + <para> + <function>apache_child_terminate</function>는 PHP 코드의 실행이 끝났을 + 때 프로세스를 종료시키기 위하여 현재 PHP 요청을 실행하는 아파치 프로세스를 + 등록합니다. 보통 메모리는 내부적으로 사용할 수 있게 해제되지만, 운영 체계에 + 반환되지 않기 때문에 많은 메모리를 소모하는 스크립트를 실행한 후에 + 프로세스를 종료시키기 위해서 사용됩니다. + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + PHP가 아파치 1 모듈이고, 아파치가 멀티 쓰레드 버전이 아니며, PHP 지시어 + <link linkend="ini.child-terminate">child_terminate</link>가 활성화 + 되어있을 때 (기본값 비활성화) &true;를 반환합니다. 이 조건이 맞지 않으면 + &false;를 반환하고 <constant>E_WARNING</constant> 등급의 오류가 발생합니다. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &note.no-windows; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>exit</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/apache/functions/apache-note.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/apache/functions/apache-note.xml diff -u phpdoc-kr/reference/apache/functions/apache-note.xml:1.4 phpdoc-kr/reference/apache/functions/apache-note.xml:1.5 --- phpdoc-kr/reference/apache/functions/apache-note.xml:1.4 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/apache/functions/apache-note.xml Sun Nov 9 17:34:25 2008 @@ -1,28 +1,129 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.2 Maintainer: progcom Status: ready --> - <refentry xml:id="function.apache-note" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>apache_note</refname> - <refpurpose>아파치의 요청 노트를 얻거나 설정한다.</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>apache_note</methodname> - <methodparam><type>string</type><parameter>note_name</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>note_value</parameter></methodparam> - </methodsynopsis> - <para> - <function>apache_note</function>는 요청의 <literal>notes</literal> 테이블에 - 존재하는 값을 얻거나 설정하는 아파치 전용 함수입니다. 하나의 인자로 호출하면, - <literal>note_name</literal>의 현재 노트값을 반환합니다. 두개의 인자로 - 호출하면, <literal>note_name</literal>의 노트값을 - <literal>note_value</literal>로 설정하고, <literal>note_name</literal>의 - 이전 노트값을 반환합니다. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.7 Maintainer: progcom Status: ready --> +<refentry xml:id="function.apache-note" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>apache_note</refname> + <refpurpose>아파치의 요청 노트를 얻거나 설정한다.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>apache_note</methodname> + <methodparam><type>string</type><parameter>note_name</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>note_value</parameter></methodparam> + </methodsynopsis> + <para> + 이 함수는 아파치 <literal>table_get</literal>과 + <literal>table_set</literal>의 래퍼입니다. 요청 동안에 존재하는 노트표를 + 편집합니다. 표의 목적은 아파치 모듈간의 통신입니다. + </para> + <para> + <function>apache_note</function>의 주 목적은 같은 요청 안에서 정보를 하나의 + 모듈에서 다른 모듈로 전달하는 것입니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>note_name</parameter></term> + <listitem> + <para> + 노트 이름. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>note_value</parameter></term> + <listitem> + <para> + 노트 값. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 하나의 인자로 호출하면, <literal>note_name</literal> 노트의 현재 값을 + 반환합니다. 두 인자로 호출하면, <literal>note_name</literal> 노트의 값을 + <literal>note_value</literal>로 설정하고, 이전의 + <literal>note_name</literal> 노트값을 반환합니다. + 노트를 확인할 수 없으면, &false;를 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>PHP와 펄 사이에 정보 넘기기</title> + <programlisting role="php"> +<![CDATA[ +<?php + +apache_note('name', 'Fredrik Ekengren'); + +// 펄 스크립트 호출 +virtual("/perl/some_script.pl"); + +$result = apahce_note("resultdata"); +?> +]]> + </programlisting> + <programlisting role="perl"> +<![CDATA[ +# 아파치 요청 객체 얻기 +my $r = Apahce->request()->main(); + +# 넘어온 데이터 얻기 +my $name = $r->notes('name'); + +# 처리 + +# 결과를 PHP로 돌려주기 +$r->notes('resultdata', $result); +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>access.log에 값 기록하기</title> + <programlisting role="php"> +<![CDATA[ +<?php + +apache_note('sessionID', session_id()); + +?> +]]> + </programlisting> + <programlisting role="apache"> +<![CDATA[ +# "%{sessionID}n"를 LogFormat 지시어에 사용할 수 있습니다. +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>virtual</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/apache/functions/apache-response-headers.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-kr/reference/apache/functions/apache-response-headers.xml diff -u phpdoc-kr/reference/apache/functions/apache-response-headers.xml:1.6 phpdoc-kr/reference/apache/functions/apache-response-headers.xml:1.7 --- phpdoc-kr/reference/apache/functions/apache-response-headers.xml:1.6 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/apache/functions/apache-response-headers.xml Sun Nov 9 17:34:25 2008 @@ -1,29 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.7 Maintainer: progcom Status: ready --> - <refentry xml:id="function.apache-response-headers" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>apache_response_headers</refname> - <refpurpose> - 모든 HTTP 응답 헤더를 가져옵니다. - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>apache_response_headers</methodname> - <void/> - </methodsynopsis> - <para> - 모든 아파치 응답 헤더의 배열을 반환합니다. 이 기능은 PHP 4.3.0 이상에서만 - 사용할 수 있습니다. - </para> - &note.apache.nsapi-module; - <para> - 참고: <function>apache_request_headers</function>, - <function>headers_sent</function>. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.14 Maintainer: progcom Status: ready --> +<refentry xml:id="function.apache-response-headers" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>apache_response_headers</refname> + <refpurpose>모든 HTTP 응답 헤더를 가져옵니다.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>apache_response_headers</methodname> + <void/> + </methodsynopsis> + <para> + 모든 HTTP 응답 헤더를 가져옵니다. + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 성공시엔 모든 아파치 응답 헤더의 배열, 실패시엔 &false;. + </para> + </refsect1> + + <refsect1 role="example"> + &reftitle.examples; + <para> + <example> + <title><function>apache_response_headers</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php +pring_r(apahce_response_headers()); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +Array +( + [Accept-Ranges] => bytes + [X-Powered-By] => PHP/4.3.8 +) +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &note.apache.nsapi-module; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>apahce_request_headers</function></member> + <member><function>headers_sent</function></member> + <member><function>headers_list</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/apache/functions/getallheaders.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-kr/reference/apache/functions/getallheaders.xml diff -u phpdoc-kr/reference/apache/functions/getallheaders.xml:1.7 phpdoc-kr/reference/apache/functions/getallheaders.xml:1.8 --- phpdoc-kr/reference/apache/functions/getallheaders.xml:1.7 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/apache/functions/getallheaders.xml Sun Nov 9 17:34:25 2008 @@ -1,37 +1,88 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.8 Maintainer: progcom Status: ready --> - <refentry xml:id="function.getallheaders" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>getallheaders</refname> - <refpurpose>모든 HTTP 요청 헤더를 가져옵니다.</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>getallheaders</methodname> - <void/> - </methodsynopsis> - <para> - <function>getallheaders</function>는 <function>apache_request_headers</function>의 - 별칭입니다. 현재 요청의 모든 HTTP 헤더를 연합 배열로 반환합니다. - 이 함수의 작동에 대한 정보는 <function>apache_request_headers</function> - 문서를 읽어보십시오. - </para> - <note> - <para> - PHP 4.3.0에서, <function>getallheaders</function>는 - <function>apache_request_headers</function>의 별칭이 - 되었습니다. 정확히는 이름이 바뀌었습니다. 이는 이 함수가 - <productname>Apache</productname> 모듈로 컴파일했을 때만 - 작동하기 때문입니다. - </para> - </note> - &note.apache.nsapi-module; - <para> - 참고: <function>apache_request_headers</function>. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.14 Maintainer: progcom Status: ready --> +<refentry xml:id="function.getallheaders" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>getallheaders</refname> + <refpurpose>모든 HTTP 요청 헤더를 가져옵니다.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>getallheaders</methodname> + <void/> + </methodsynopsis> + <para> + 현재 요청에서 모든 HTTP 헤더를 가져옵니다. + </para> + <para> + 이 함수는 <function>apache_request_headers</function>의 별칭입니다. 이 + 함수의 작동에 관해서는 <function>apache_request_headers</function>를 + 참고하십시오. + </para> + &apache.req.module; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + <function>apahce_request_headers</function>의 별칭이 되었습니다. + 정확히는, 이름이 바뀌었습니다. 이 함수가 아파치에서만 작동하기 + 때문입니다. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>getallheaders</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +foreach (getallheaders() as $name => $value) { + echo "$name: $value\n"; +} + +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &note.apache.nsapi-module; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>apache_response_headers</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/apache/functions/virtual.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc-kr/reference/apache/functions/virtual.xml diff -u phpdoc-kr/reference/apache/functions/virtual.xml:1.8 phpdoc-kr/reference/apache/functions/virtual.xml:1.9 --- phpdoc-kr/reference/apache/functions/virtual.xml:1.8 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/apache/functions/virtual.xml Sun Nov 9 17:34:25 2008 @@ -1,36 +1,116 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.7 Maintainer: progcom Status: ready --> - <refentry xml:id="function.virtual" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>virtual</refname> - <refpurpose>아파치 하위 요청을 실행합니다.</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>int</type><methodname>virtual</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - <function>virtual</function>은 mod_include의 - &lt;!--#include virtual...--&gt;과 동일한 아파치 전용 함수입니다. - 이것은 아파치 하위 요청을 실행합니다. CGI 스크립트나 .shtml 파일 - 등 아파치를 통해서 실행 가능한 무엇이든 가능합니다. - CGI 스크립트의 경우, 그 스크립트가 유효한 CGI 헤더를 생성해야 함에 - 주의하십시오. 최소한 Content-type 헤더가 필요합니다. - </para> - <para> - 하위 요청을 실행할 때, 헤더를 포함한 모든 버퍼를 종료하고 - 브라우저에 출력합니다. - </para> - <para> - PHP 4.0.6부터, PHP 파일에 <function>virtual</function>을 사용할 수 - 있습니다. 그러나, 다른 PHP 파일을 포함할때는 <function>include</function>나 - <function>require</function>를 사용하는 편이 좋습니다. - </para> - &note.apache.nsapi-module; - </refsect1> - </refentry> +<!-- EN-Revision: 1.16 Maintainer: progcom Status: ready --> +<refentry xml:id="function.virtual" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>virtual</refname> + <refpurpose>아파치 하위 요청을 실행합니다.</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>virtual</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + <function>virtual</function>은 mod_include의 + &lt;!--#include virtual...--&gt;과 동일한 아파치 전용 함수입니다. + 이것은 아파치 하위 요청을 실행합니다. CGI 스크립트나 .shtml 파일 + 등 아파치를 통해서 실행 가능한 무엇이든 가능합니다. + CGI 스크립트의 경우, 그 스크립트가 유효한 CGI 헤더를 생성해야 함에 + 주의하십시오. 최소한 Content-type 헤더가 필요합니다. + </para> + <para> + 하위 요청을 실행할 때, 헤더를 포함한 모든 버퍼를 종료하고 + 브라우저에 출력합니다. + </para> + &apache.req.module; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + 가상 명령을 실행할 파일. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 성공시엔 가상 명령을 실행하고, 실패시엔 &false;를 반환합니다. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.0.6</entry> + <entry> + 이 함수를 PHP 파일에 사용할 수 있습니다. 그러나, 일반적으로 PHP 파일에 + 대해서는 <function>include</function>나 <function>require</function>를 + 사용하는 편이 좋습니다. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + 예제는 <function>apache_note</function>를 참고하십시오. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <warning> + <para> + 쿼리 문자열은 포함하는 파일로 전해지지만, <varname>$_GET</varname>은 부모 + 스크립트에서 복사되며, <varname>$_SERVER['QUERY_STRING']</varname>만 + 주어진 쿼리 문자열로 채워집니다. 쿼리 문자열은 아파치 2를 사용할 때만 + 전달됩니다. 요청된 파일은 아파치 접근 기록에 남지 않습니다. + </para> + </warning> + <note> + <para> + 요청된 파일에서 설정한 환경 변수는 호출한 스크립트에서 확인할 수 없습니다. + </para> + </note> + &note.apache.nsapi-module; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>apache_note</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: @@ -52,4 +132,3 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> - http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/count.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-kr/reference/array/functions/count.xml diff -u phpdoc-kr/reference/array/functions/count.xml:1.6 phpdoc-kr/reference/array/functions/count.xml:1.7 --- phpdoc-kr/reference/array/functions/count.xml:1.6 Mon Jun 25 11:20:13 2007 +++ phpdoc-kr/reference/array/functions/count.xml Sun Nov 9 17:34:25 2008 @@ -1,21 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.19 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.20 Maintainer: progcom Status: ready --> <!-- CREDITS: fuzzy74 --> <refentry xml:id="function.count" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>count</refname> <refpurpose>배열의 원소수, 객체의 프로퍼티수를 셉니다</refpurpose> </refnamediv> - <refsect1> - <title>설명</title> + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>count</methodname> <methodparam><type>mixed</type><parameter>var</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> - 일반적으로 <type>array</type>형에 들어있는 원소수를 반환합니다. 다른 형은 - (하나의 원소만 가지기 때문입니다) + 배열의 요소 수를 세거나, 객체의 프로퍼티 수를 셉니다. </para> <para> 객체는 <link linkend="ref.spl">SPL</link>을 설치했다면, @@ -25,25 +24,50 @@ <function>count</function> 함수의 반환값을 반환합니다. </para> <para> + 매뉴얼 <link linkend="language.types.array">배열</link> 섹션을 참고하여 + 배열이 PHP에서 어떻게 구현되고 사용되는지 확인하십시오. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para> + 배열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>mode</parameter></term> + <listitem> + <para> + 부수적인 <parameter>mode</parameter> 인자를 + <constant>COUNT_RECURSIVE</constant>(또는 1)로 설정하면, + <function>count</function>는 배열을 재귀적으로 셉니다. 이는 다차원 + 배열의 요소를 셀 경우 유용한 경우가 있습니다. + <parameter>mode</parameter> 기본값은 <literal>0</literal>입니다. + <function>count</function>는 무한 재귀를 검출하지 못합니다. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + <parameter>var</parameter> 안에 있는 요소 수를 반환합니다. 보통 + <type>array</type>이며, 다른 자료형은 하나의 요소만 가집니다. + </para> + <para> <parameter>var</parameter>가 배열이나 <literal>Countable</literal> 인터페이스를 가진 객체가 아니라면, <literal>1</literal>을 반환합니다. 한가지 예외는, <parameter>var</parameter>가 &null;일 경우에 <literal>0</literal>을 반환합니다. </para> - <note> - <simpara> - 선택적인 <parameter>mode</parameter> 매개변수는 PHP 4.2.0부터 사용할 수 - 있습니다. - </simpara> - </note> - <para> - 선택적인 <parameter>mode</parameter> 매개변수를 - <constant>COUNT_RECURSIVE</constant>(또는 1)로 설정하면, - <function>count</function>는 재귀적으로 배열을 셉니다. 이 매개변수는 다차원 - 배열의 모든 원소를 셀때 특히 유용합니다. <parameter>mode</parameter>의 - 기본값은 <literal>0</literal>입니다. <function>count</function>는 무한 - 재귀를 감지하지 못합니다. - </para> <caution> <para> <function>count</function>는 설정하지 않은 변수에 대하여 0을 반환하지만, @@ -51,11 +75,31 @@ <function>isset</function>을 사용하시오. </para> </caution> + </refsect1> + <refsect1 role="changelog"> <para> - PHP에서 배열이 어떻게 구현되고 어떻게 사용되는지에 대한 자세한 설명을 - 보기 위해서는 <link linkend="language.types.array">배열</link> 섹션을 - 참고하십시오. + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.2.0</entry> + <entry> + 부수적인 <parameter>mode</parameter> 인자가 추가되었습니다. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>count</function> 예제</title> @@ -86,9 +130,7 @@ </para> <para> <example> - <title> - 재귀적인 <function>count</function> 예제 (PHP &gt;= 4.2.0) - </title> + <title>재귀적인 <function>count</function> 예제</title> <programlisting role="php"> <![CDATA[ <?php @@ -106,10 +148,15 @@ </programlisting> </example> </para> + </refsect1> + <refsect1 role="seealso"> + &reftitle.seealso; <para> - 참고: <function>is_array</function>, - <function>isset</function>, - <function>strlen</function>. + <simplelist> + <member><function>is_array</function></member> + <member><function>isset</function></member> + <member><function>strlen</function></member> + </simplelist> </para> </refsect1> </refentry>
« previous php.doc.kr (#755) next »