svn: /phpdoc/ru/trunk/reference/ bzip2/functions/bzcompress.xml bzip2/functions/bzdecompress.xml filesystem/functions/filegroup.xml
filesystem/functions/pathinfo.xml

From: Date: Sat, 30 Jul 2011 19:57:26 +0000
Subject: svn: /phpdoc/ru/trunk/reference/ bzip2/functions/bzcompress.xml bzip2/functions/bzdecompress.xml filesystem/functions/filegroup.xml
filesystem/functions/pathinfo.xml
Groups: php.doc.ru 
Request: Send a blank email to doc-ru+get-2012@lists.php.net to get a copy of this message
irker Sat, 30 Jul 2011 19:57:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313985 Log: Updated translation and revision number Changed paths: U phpdoc/ru/trunk/reference/bzip2/functions/bzcompress.xml U phpdoc/ru/trunk/reference/bzip2/functions/bzdecompress.xml U phpdoc/ru/trunk/reference/filesystem/functions/filegroup.xml U phpdoc/ru/trunk/reference/filesystem/functions/pathinfo.xml Modified: phpdoc/ru/trunk/reference/bzip2/functions/bzcompress.xml =================================================================== --- phpdoc/ru/trunk/reference/bzip2/functions/bzcompress.xml 2011-07-30 19:30:05 UTC (rev 313984) +++ phpdoc/ru/trunk/reference/bzip2/functions/bzcompress.xml 2011-07-30 19:57:26 UTC (rev 313985) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 297028 Maintainer: shein Status: ready --> +<!-- EN-Revision: 313913 Maintainer: shein Status: ready --> <!-- Reviewed: no --> <!-- $Id --> <refentry xml:id="function.bzcompress" xmlns="http://docbook.org/ns/docbook"> Modified: phpdoc/ru/trunk/reference/bzip2/functions/bzdecompress.xml =================================================================== --- phpdoc/ru/trunk/reference/bzip2/functions/bzdecompress.xml 2011-07-30 19:30:05 UTC (rev 313984) +++ phpdoc/ru/trunk/reference/bzip2/functions/bzdecompress.xml 2011-07-30 19:57:26 UTC (rev 313985) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 297028 Maintainer: shein Status: ready --> +<!-- EN-Revision: 313913 Maintainer: shein Status: ready --> <!-- Reviewed: no --> <!-- $Id --> <refentry xml:id="function.bzdecompress" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -51,7 +51,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - The decompressed string or number of error in case of error. + Распакованная строка или код ошибки в случае неудачного завершения работы. </para> </refsect1> <refsect1 role="examples"> Modified: phpdoc/ru/trunk/reference/filesystem/functions/filegroup.xml =================================================================== --- phpdoc/ru/trunk/reference/filesystem/functions/filegroup.xml 2011-07-30 19:30:05 UTC (rev 313984) +++ phpdoc/ru/trunk/reference/filesystem/functions/filegroup.xml 2011-07-30 19:57:26 UTC (rev 313985) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 297028 Maintainer: shein Status: ready --> +<!-- EN-Revision: 313913 Maintainer: shein Status: ready --> <!-- Reviewed: no --> <!-- $Revision$ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filegroup"> Modified: phpdoc/ru/trunk/reference/filesystem/functions/pathinfo.xml =================================================================== --- phpdoc/ru/trunk/reference/filesystem/functions/pathinfo.xml 2011-07-30 19:30:05 UTC (rev 313984) +++ phpdoc/ru/trunk/reference/filesystem/functions/pathinfo.xml 2011-07-30 19:57:26 UTC (rev 313985) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 306483 Maintainer: shein Status: ready --> +<!-- EN-Revision: 313876 Maintainer: shein Status: ready --> <!-- Reviewed: no --> <!-- $Revision$ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pathinfo"> @@ -16,8 +16,9 @@ <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME</initializer></methodparam> </methodsynopsis> <para> - <function>pathinfo</function> возвращает ассоциативный массив, - который содержит информацию о пути <parameter>path</parameter>. + <function>pathinfo</function> возвращает информацию о + <parameter>path</parameter> в виде ассоциативного массива или + строки в зависимости от <parameter>options</parameter>. </para> </refsect1> @@ -29,7 +30,7 @@ <term><parameter>path</parameter></term> <listitem> <para> - Проверяемый путь. + Анализируемый путь. </para> </listitem> </varlistentry> @@ -37,14 +38,16 @@ <term><parameter>options</parameter></term> <listitem> <para> - Вы можете указать, какие элементы будут возвращены при помощи - необязательного параметра <parameter>options</parameter>. Он состоит из + Если указан, то задает для возврата отдельный элемент: + один из следующих <constant>PATHINFO_DIRNAME</constant>, <constant>PATHINFO_BASENAME</constant>, <constant>PATHINFO_EXTENSION</constant> и <constant>PATHINFO_FILENAME</constant>. - По умолчанию возвращаются все элементы. </para> + <para>Если <parameter>options</parameter> не указан, то возвращаются + все доступные элементы. + </para> </listitem> </varlistentry> </variablelist> @@ -54,14 +57,21 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Возвращается ассоциативный массив (<type>array</type>) со - следующими ключами: + Если параметр <parameter>options</parameter> не передан, то + возвращаемый ассоциативный массив (<type>array</type>) + будет содержать следующие элементы: <literal>dirname</literal>, <literal>basename</literal>, <literal>extension</literal> (если есть) и <literal>filename</literal>. </para> + <note> + <para> + Если <parameter>path</parameter> не содержит расширения, то не будет + возвращен элемент <literal>extension</literal> (см. ниже второй пример). + </para> + </note> <para> - Если указан параметр <parameter>options</parameter>, эта функция - вернет <type>string</type>, если запрошены не все элементы. + Если указан параметр <parameter>options</parameter>, будет возвращена + строка (<type>string</type>), содержащая указанный элемент. </para> </refsect1> @@ -117,6 +127,30 @@ </screen> </example> </para> + <para> + <example> + <title>Пример с <function>pathinfo</function>, показывающий разницу между null и отсутствием расширения.</title> + <programlisting role="php"> +<![CDATA[ +<?php +$path_parts = pathinfo('/path/nullextension.'); +var_dump($path_parts['extension']); + +$path_parts = pathinfo('/path/noextension'); +var_dump($path_parts['extension']); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +string(0) "" + +Notice: Undefined index: extension in /test.php on line 6 +]]> + </screen> + </example> + </para> </refsect1> <refsect1 role="notes">

« previous php.doc.ru (#2012) next »