svn: /phpdoc/ru/trunk/reference/zip/ziparchive/ locatename.xml

From: Date: Fri, 23 Dec 2011 13:08:40 +0000
Subject: svn: /phpdoc/ru/trunk/reference/zip/ziparchive/ locatename.xml
Groups: php.doc.ru 
Request: Send a blank email to doc-ru+get-3436@lists.php.net to get a copy of this message
irker Fri, 23 Dec 2011 13:08:40 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=321351 Log: Commited translation by HaJIuBauKa Changed paths: A phpdoc/ru/trunk/reference/zip/ziparchive/locatename.xml Added: phpdoc/ru/trunk/reference/zip/ziparchive/locatename.xml =================================================================== --- phpdoc/ru/trunk/reference/zip/ziparchive/locatename.xml (rev 0) +++ phpdoc/ru/trunk/reference/zip/ziparchive/locatename.xml 2011-12-23 13:08:40 UTC (rev 321351) @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<!-- EN-Revision: 297028 Maintainer: irker Status: ready --> +<!-- Reviewed: no --> +<refentry xml:id="function.ziparchive-locatename" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>ZipArchive::locateName</refname> + <refpurpose>Возвращает индекс элемента в архиве</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</type><methodname>ZipArchive::locateName</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + <para> + Находит элемент по его имени. + </para> + </refsect1> + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> + Имя элемента для поиска + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + Флаги определяемые битовой маской из следующих значений, + либо 0 для ни одного из них. + <itemizedlist> + <listitem> + <para> + <constant>ZIPARCHIVE::FL_NOCASE</constant> + </para> + </listitem> + <listitem> + <para> + <constant>ZIPARCHIVE::FL_NODIR</constant> + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Возвращает индекс элемента в случае успеха&return.falseforfailure;. + </para> + </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title>Создается архив и затем ипользуется метод <function>ZipArchive::locateName</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'testlocate.zip'; + +$zip = new ZipArchive; +if ($zip->open($file, ZIPARCHIVE::CREATE) !== TRUE) { + exit('failed'); +} + +$zip->addFromString('entry1.txt', 'entry #1'); +$zip->addFromString('entry2.txt', 'entry #2'); +$zip->addFromString('dir/entry2d.txt', 'entry #2'); + +if (!$zip->status == ZIPARCHIVE::ER_OK) { + echo "failed to write zip\n"; +} +$zip->close(); + +if ($zip->open($file) !== TRUE) { + exit('failed'); +} + +echo $zip->locateName('entry1.txt') . "\n"; +echo $zip->locateName('eNtry2.txt') . "\n"; +echo $zip->locateName('eNtry2.txt', ZIPARCHIVE::FL_NOCASE) . "\n"; +echo $zip->locateName('enTRy2d.txt', ZIPARCHIVE::FL_NOCASE|ZIPARCHIVE::FL_NODIR) . "\n"; +$zip->close(); + +?> +]]> + </programlisting> + </example> + &example.outputs; + <screen> +<![CDATA[ +0 + +1 +2 +]]> + </screen> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Property changes on: phpdoc/ru/trunk/reference/zip/ziparchive/locatename.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native

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