1
0
mirror of https://github.com/php/doc-ru.git synced 2026-04-24 15:58:39 +02:00
Files
archived-doc-ru/reference/ffi/setup.xml
T
Gina Peter Banyard a19b1f8a7f Apply revchecked skipped commit c60943fefc4ff8950460e76d714a463437cf0eb2
Replace PHP_INI_* with INI_* constants
2024-01-26 13:58:08 +00:00

127 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: d197a1438a0849defa89a2595af1a32ef8c3802c Maintainer: rjhdby Status: ready -->
<!-- Reviewed: no -->
<chapter xml:id="ffi.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<section xml:id="ffi.requirements">
&reftitle.required;
<para>
Для работы модуля необходимо установить библиотеку <link xlink:href="&url.libffi;">libffi</link>.
</para>
</section>
<!-- {{{ Installation -->
&reference.ffi.configure;
<!-- }}} -->
<section xml:id="ffi.configuration">
&reftitle.runtime;
&extension.runtime;
<para>
<table>
<title>&ConfigureOptions; FFI</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.ffi.enable">ffi.enable</link></entry>
<entry>"preload"</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.ffi.preload">ffi.preload</link></entry>
<entry>""</entry>
<entry><constant>INI_SYSTEM</constant></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
&ini.php.constants;
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.ffi.enable">
<term>
<parameter>ffi.enable</parameter>
<type>string</type>
</term>
<listitem>
<para>
Позволяет разрешить (<literal>"true"</literal>) или запретить
(<literal>"false"</literal>) использование FFI API, либо
ограничить использование только для CLI SAPI и
предзагруженных файлов (<literal>"preload"</literal>).
</para>
<para>
Ограничения FFI API влияют только на класс
<classname>FFI</classname>, но не на перезагруженные
функции объекта <classname>FFI\CData</classname>.
Это значит, что можно создать объекты
<classname>FFI\CData</classname> в предзагружаемых
файлах и использовать потом напрямую из скриптов PHP.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.ffi.preload">
<term>
<parameter>ffi.preload</parameter>
<type>string</type>
</term>
<listitem>
<para>
Позволяет предзагружать привязки FFI во время
старта, что невозможно с
<methodname>FFI::load</methodname>,
если включено <link linkend="ini.opcache.preload-user">opcache.preload_user</link>.
Эта директива принимает список разделителей имён файлов
<constant>DIRECTORY_SEPARATOR</constant>.
Предзагруженные привязки доступны с помощью
вызова <methodname>FFI::scope</methodname>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="ffi.resources">
&reftitle.resources;
&no.resource;
</section>
</chapter>
<!-- 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
-->