1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-27 09:12:07 +01:00
Files
archived-doc-ru/reference/fileinfo/functions/finfo-buffer.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

154 lines
4.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 1160ec4e7d21a2619e9661d6afe3a6356267c6c2 Maintainer: mch Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.finfo-buffer" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>finfo_buffer</refname>
<refname>finfo::buffer</refname>
<refpurpose>Возвращает информацию о строке буфера</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>&style.procedural;</para>
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>finfo_buffer</methodname>
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>&style.oop;</para>
<methodsynopsis role="finfo">
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::buffer</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Эта функция используется для получения информации о бинарных данных в строке.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>finfo</parameter></term>
<listitem>
&fileinfo.parameters.finfo;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<para>
Содержимое проверяемого файла.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Одна или несколько объединённых через бинарное ИЛИ
<link linkend="fileinfo.constants">констант Fileinfo</link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>context</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает текстовое описание для аргумента <parameter>string</parameter>
или &false; в случае возникновения ошибки.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&fileinfo.changelog.finfo-object;
<row>
<entry>8.0.0</entry>
<entry>
<parameter>context</parameter> теперь допускает значение null.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример <function>finfo_buffer</function></title>
<programlisting role="php">
<![CDATA[
<?php
$finfo = new finfo(FILEINFO_MIME);
echo $finfo->buffer($_POST["script"]) . "\n";
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
application/x-sh; charset=us-ascii
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>finfo_file</function></member>
</simplelist>
</para>
</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
-->