1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

lua: fix XML by converting para to simpara tags via script (#5156)

This commit is contained in:
Gina Peter Banyard
2026-01-19 02:46:16 +00:00
committed by GitHub
parent 3c36a56c9e
commit 64ae8f7454
14 changed files with 105 additions and 134 deletions

View File

@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<book xml:id="book.lua" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="book.lua">
<?phpdoc extension-membership="pecl" ?>
<title>Lua</title>
<titleabbrev>Lua</titleabbrev>
<preface xml:id="intro.lua">
&reftitle.intro;
<para>
<simpara>
"Lua is a powerful, fast, light-weight, embeddable scripting language."
This extension embeds the lua interpreter and offers an OO-API to lua
variables and functions.
</para>
</simpara>
</preface>
&reference.lua.setup;
@@ -20,7 +19,6 @@
&reference.lua.lua;
&reference.lua.luaclosure;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,18 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="lua.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.installation">
&reftitle.install;
<para>
<simpara>
&pecl.info;
<link xlink:href="&url.pecl.package;lua">&url.pecl.package;lua</link>
</para>
</simpara>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="class.lua" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.lua" role="class">
<title>The Lua class</title>
<titleabbrev>Lua</titleabbrev>
@@ -11,9 +10,9 @@
<!-- {{{ Lua intro -->
<section xml:id="lua.intro">
&reftitle.intro;
<para>
<simpara>
</para>
</simpara>
</section>
<!-- }}} -->
@@ -40,13 +39,13 @@
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.lua')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis)" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.lua')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis)"/>
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ Lua constants -->
<section xml:id="lua.constants">
&reftitle.constants;
@@ -55,7 +54,7 @@
<varlistentry xml:id="lua.constants.lua-version">
<term><constant>Lua::LUA_VERSION</constant></term>
<listitem>
<para></para>
<simpara/>
</listitem>
</varlistentry>
@@ -69,7 +68,6 @@
&reference.lua.entities.lua;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.assign" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.assign">
<refnamediv>
<refname>Lua::assign</refname>
<refpurpose>Assign a PHP variable to Lua</refpurpose>
@@ -14,9 +13,9 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -28,17 +27,17 @@
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -46,9 +45,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns <varname>$this</varname> or &null; on failure.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
@@ -82,7 +81,6 @@ Array
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.call" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.call">
<refnamediv>
<refname>Lua::call</refname>
<refname>Lua::__call</refname>
@@ -22,9 +21,9 @@
<methodparam choice="opt"><type>array</type><parameter>args</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>use_self</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -36,25 +35,25 @@
<varlistentry>
<term><parameter>lua_func</parameter></term>
<listitem>
<para>
<simpara>
Function name in lua
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>args</parameter></term>
<listitem>
<para>
<simpara>
Arguments passed to the Lua function
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>use_self</parameter></term>
<listitem>
<para>
<simpara>
Whether to use <literal>self</literal>
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -62,10 +61,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns result of the called function, &null; for wrong arguments or
&false; on other failure.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
@@ -107,7 +106,6 @@ string(5) "1-2-3"
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.construct">
<refnamediv>
<refname>Lua::__construct</refname>
<refpurpose>Lua constructor</refpurpose>
@@ -13,9 +12,9 @@
<modifier>public</modifier> <methodname>Lua::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>lua_script_file</parameter><initializer>NULL</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -27,8 +26,8 @@
<varlistentry>
<term><parameter>lua_script_file</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -36,14 +35,13 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
</para>
<simpara>
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.eval" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.eval">
<refnamediv>
<refname>Lua::eval</refname>
<refpurpose>Evaluate a string as Lua code</refpurpose>
@@ -13,9 +12,9 @@
<modifier>public</modifier> <type>mixed</type><methodname>Lua::eval</methodname>
<methodparam><type>string</type><parameter>statements</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -27,9 +26,9 @@
<varlistentry>
<term><parameter>statements</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,10 +36,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns result of evaled code, &null; for wrong arguments or &false; on
other failure.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
@@ -68,7 +67,6 @@ CODE
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.getversion" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.getversion">
<refnamediv>
<refname>Lua::getVersion</refname>
<refpurpose>The getversion purpose</refpurpose>
@@ -11,11 +10,11 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>string</type><methodname>Lua::getVersion</methodname>
<void />
<void/>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -28,14 +27,13 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns <varname linkend="lua.constants.lua-version">Lua::LUA_VERSION</varname>.
</para>
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.include" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.include">
<refnamediv>
<refname>Lua::include</refname>
<refpurpose>Parse a Lua script file</refpurpose>
@@ -13,9 +12,9 @@
<modifier>public</modifier> <type>mixed</type><methodname>Lua::include</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -27,9 +26,9 @@
<varlistentry>
<term><parameter>file</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,15 +36,14 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns result of included code, &null; for wrong arguments or &false; on
other failure.
</para>
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="lua.registercallback" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.registercallback">
<refnamediv>
<refname>Lua::registerCallback</refname>
<refpurpose>Register a PHP function to Lua</refpurpose>
@@ -14,9 +13,9 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>callable</type><parameter>function</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Register a PHP function to Lua as a function named "$name"
</para>
</simpara>
</refsect1>
@@ -26,17 +25,17 @@
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>function</parameter></term>
<listitem>
<para>
<simpara>
A valid PHP function callback
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -44,10 +43,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns <varname>$this</varname>, &null; for wrong arguments or &false; on
other failure.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
@@ -83,7 +82,6 @@ array(3) {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="class.luaclosure" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.luaclosure" role="class">
<title>The LuaClosure class</title>
<titleabbrev>LuaClosure</titleabbrev>
@@ -11,10 +10,10 @@
<!-- {{{ LuaClosure intro -->
<section xml:id="luaclosure.intro">
&reftitle.intro;
<para>
<simpara>
LuaClosure is a wrapper class for LUA_TFUNCTION which could be return from
calling to Lua function.
</para>
</simpara>
</section>
<!-- }}} -->
@@ -32,9 +31,9 @@
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.luaclosure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.luaclosure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"/>
</classsynopsis>
<!-- }}} -->
@@ -45,7 +44,6 @@
&reference.lua.entities.luaclosure;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="luaclosure.invoke" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="luaclosure.invoke">
<refnamediv>
<refname>LuaClosure::__invoke</refname>
<refpurpose>Invoke luaclosure</refpurpose>
@@ -13,9 +12,9 @@
<modifier>public</modifier> <type>void</type><methodname>LuaClosure::__invoke</methodname>
<methodparam rep="repeat"><type>mixed</type><parameter>args</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
</para>
</simpara>
&warn.undocumented.func;
@@ -27,9 +26,9 @@
<varlistentry>
<term><parameter>args</parameter></term>
<listitem>
<para>
</para>
<simpara>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,9 +36,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
@@ -72,7 +71,6 @@ hello worldhello world
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="class.luaexception" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.luaexception" role="class">
<title>The LuaException class</title>
<titleabbrev>LuaException</titleabbrev>
@@ -11,9 +10,9 @@
<!-- {{{ LuaException intro -->
<section xml:id="luaexception.intro">
&reftitle.intro;
<para>
<simpara>
</para>
</simpara>
</section>
<!-- }}} -->
@@ -29,35 +28,34 @@
<ooclass>
<classname>LuaException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>Exception</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)"/>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.luaexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.luaexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"/>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])"/>
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
&reference.lua.entities.luaexception;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,29 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="lua.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="lua.setup">
&reftitle.setup;
<section xml:id="lua.requirements">
&reftitle.required;
<para>
<simpara>
To use this extension, you will need Lua installed, available on the <link xlink:href="&url.lua;">Lua homepage</link>
</para>
</simpara>
</section>
<section xml:id="lua.installation">
&reftitle.install;
<para>
<simpara>
&pecl.moved;
</para>
<para>
</simpara>
<simpara>
&pecl.info;
<link xlink:href="&url.pecl.package;lua">&url.pecl.package;lua</link>.
</para>
</simpara>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml