ref.bcompiler: switch to new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@230090 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-02-17 18:45:21 +00:00
parent 3f247906f8
commit 8a2f683d8d
12 changed files with 630 additions and 118 deletions

View file

@ -1,21 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-load-exe">
<refnamediv>
<refname>bcompiler_load_exe</refname>
<refpurpose>Reads and creates classes from a bcompiler exe file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_load_exe</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
Reads data from a bcompiler exe file and creates classes from the bytecodes.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The exe file path, as a string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_load</function> example</title>
@ -32,6 +58,12 @@ print_r(get_defined_classes());
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,28 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-load">
<refnamediv>
<refname>bcompiler_load</refname>
<refpurpose>Reads and creates classes from a bz compressed file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_load</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<note>
<para>
Please use include or require statements to parse bytecodes, it's more
portable and convenient way than using this function.
</para>
</note>
<para>
Reads data from a bzcompressed file and creates classes from the bytecodes.
Please note that this function won't execute script body code contained in the bytecode file.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The bzcompressed file path, as a string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_load</function> example</title>
@ -40,6 +59,22 @@ print_r(get_defined_classes());
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
<note>
<para>
Please use include or require statements to parse bytecodes, it's more
portable and convenient way than using this function.
</para>
<para>
Please note that this function won't execute script body code contained
in the bytecode file.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,27 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.bcompiler-parse-class">
<refnamediv>
<refname>bcompiler_parse_class</refname>
<refpurpose>Reads the bytecodes of a class and calls back to a user function</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_parse_class</methodname>
<methodparam><type>string</type><parameter>class</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
</methodsynopsis>
<note>
<para>
This function has been removed from bcompiler and is no
longer available as of bcompiler 0.5.
</para>
</note>
<para>
Reads the bytecodes of a class and calls back to a user function.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>class</parameter></term>
<listitem>
<para>
The class name, as a string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>callback</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_parse_class</function> example</title>
@ -30,7 +58,7 @@
<?php
function readByteCodes($data) {
print_r($data);
print_r($data);
}
bcompiler_parse_class("DB","readByteCodes");
@ -41,6 +69,18 @@ bcompiler_parse_class("DB","readByteCodes");
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
<note>
<para>
This function has been removed from bcompiler and is no longer available
as of bcompiler 0.5.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,28 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.bcompiler-read">
<refnamediv>
<refname>bcompiler_read</refname>
<refpurpose>Reads and creates classes from a filehandle</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_read</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<note>
<para>
Please use include or require statements to parse
bytecodes, it's more portable and convenient way than using this function.
</para>
</note>
<para>
Reads data from a open file handle and creates classes from the bytecodes.
Please note that this function won't execute script body code contained in the bytecode file.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_read</function> example</title>
@ -40,6 +59,22 @@ print_r(get_defined_classes());
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
<note>
<para>
Please use include or require statements to parse bytecodes, it's more
portable and convenient way than using this function.
</para>
<para>
Please note that this function won't execute script body code contained
in the bytecode file.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,26 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-write-class">
<refnamediv>
<refname>bcompiler_write_class</refname>
<refpurpose>Writes an defined class as bytecodes</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_class</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>string</type><parameter>className</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extends</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
This reads the bytecodes from PHP for an existing class, and writes them
to the open file handle, It does not perform dependency checking, so make
sure you write the classes in an order that will not result in an
'undefined class' occurring when you load it.
Reads the bytecodes from PHP for an existing class, and writes them to the
open file handle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>className</parameter></term>
<listitem>
<para>
The class name, as a string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>extends</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_class</function> example</title>
@ -41,11 +80,30 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
<note>
<para>
This function does not perform dependency checking, so make sure you
write the classes in an order that will not result in an
<literal>undefined class</literal> error occurring when you load it.
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>,
and <function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,23 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.bcompiler-write-constant">
<refnamediv>
<refname>bcompiler_write_constant</refname>
<refpurpose>Writes a defined constant as bytecodes</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_constant</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>string</type><parameter>constantName</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
This function reads the bytecodes from PHP for an existing constant, and
writes them to the open file handle.
Reads the bytecodes from PHP for an existing constant, and writes them to
the open file handle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>constantName</parameter></term>
<listitem>
<para>
The name of the defined constant, as a string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_constant</function> example</title>
@ -37,11 +71,23 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>,
and <function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,23 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-write-exe-footer">
<refnamediv>
<refname>bcompiler_write_exe_footer</refname>
<refpurpose>Writes the start pos, and sig to the end of a exe type file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_exe_footer</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>int</type><parameter>startpos</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
An EXE (or self executable) file consists of 3 parts,
</para>
<para>
An EXE (or self executable) file consists of 3 parts:
<simplelist>
<member>
The stub (executable code, e.g. a compiled C program) that loads PHP
@ -27,33 +24,72 @@
<member>The Bytecodes (uncompressed only for the moment)</member>
<member>The bcompiler EXE footer</member>
</simplelist>
The <parameter>startpos</parameter> is the file position at
which the Bytecodes start, and can be obtained using ftell($fh).
</para>
<para>
To obtain a suitable stub you can compile php_embed-based stub phpe.c
located in the examples/embed directory on bcompiler's CVS.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>startpos</parameter></term>
<listitem>
<para>
The file position at which the Bytecodes start, and can be obtained
using <function>ftell</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_footer</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* creating the output file (example.exe) */
$fh = fopen("example.exe", "w");
/* 1) writing a stub (phpe.exe) */
$size = filesize("phpe.exe");
$fr = fopen("phpe.exe", "r");
fwrite($fh, fread($fr, $size), $size);
$startpos = ftell($fh);
/* 2) writing bytecodes */
bcompiler_write_header($fh);
bcompiler_write_class($fh, "myclass");
bcompiler_write_function($fh, "main");
bcompiler_write_footer($fh);
/* 3) writing EXE footer */
bcompiler_write_exe_footer($fh, $startpos);
/* closing the output file */
fclose($fh);
?>
@ -61,12 +97,24 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>,
<function>bcompiler_write_class</function>, and
<function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_class</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,22 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-write-file">
<refnamediv>
<refname>bcompiler_write_file</refname>
<refpurpose>Writes a php source file as bytecodes</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_file</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
This function complies specified source file into bytecodes, and writes
them to the open file handle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The source file path, as a string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_file</function> example</title>
@ -38,11 +73,23 @@ include "example.phb";
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>, and
<function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,21 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-write-footer">
<refnamediv>
<refname>bcompiler_write_footer</refname>
<refpurpose>Writes the single character \x00 to indicate End of compiled data</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_footer</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
Writes the single character \x00 to indicate End of compiled data.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_footer</function> example</title>
@ -34,11 +60,22 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>, and
<function>bcompiler_write_header</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,25 +1,59 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.bcompiler-write-function">
<refnamediv>
<refname>bcompiler_write_function</refname>
<refpurpose>Writes an defined function as bytecodes</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_function</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>string</type><parameter>functionName</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
This reads the bytecodes from PHP for an existing function, and writes
them to the open file handle. Order is not important, (eg. if function b
uses function a, and you compile it like the example below, it will
work perfectly OK).
Reads the bytecodes from PHP for an existing function, and writes them to
the open file handle. Order is not important, (eg. if function b uses
function a, and you compile it like the example below, it will work
perfectly OK).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>functionName</parameter></term>
<listitem>
<para>
The function name, as a string.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_function</function> example</title>
@ -38,11 +72,23 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>, and
<function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,24 +1,58 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.bcompiler-write-functions-from-file">
<refnamediv>
<refname>bcompiler_write_functions_from_file</refname>
<refpurpose>Writes all functions defined in a file as bytecodes</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_functions_from_file</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam><type>string</type><parameter>fileName</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
This function searches for all functions declared in the given file, and
writes their correspondent bytecodes to the open file handle. Always
remember to include/require the file you intend to compile.
Searches for all functions declared in the given file, and writes their
correspondent bytecodes to the open file handle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>fileName</parameter></term>
<listitem>
<para>
The file to be compiled.
You must always include or require the file you intend to compile.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_functions_from_file</function> example</title>
@ -38,11 +72,23 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_header</function>, and
<function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_header</function></member>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,24 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/bcompiler.xml, last change in rev 1.5 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.bcompiler-write-header">
<refnamediv>
<refname>bcompiler_write_header</refname>
<refpurpose>Writes the bcompiler header</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>bcompiler_write_header</methodname>
<methodparam><type>resource</type><parameter>filehandle</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>write_ver</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
Writes the header part of a bcompiler file.
Optional second parameter can be used to write bytecode in a previously
used format, so that you can use it with older versions of bcompiler.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filehandle</parameter></term>
<listitem>
<para>
A file handle as returned by <function>fopen</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>write_ver</parameter></term>
<listitem>
<para>
Can be used to write bytecode in a previously used format, so that you
can use it with older versions of bcompiler.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>bcompiler_write_header</function> example</title>
@ -36,13 +69,22 @@ fclose($fh);
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&warn.experimental.func;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>bcompiler_write_file</function>,
<function>bcompiler_write_class</function>,
<function>bcompiler_write_function</function>, and
<function>bcompiler_write_footer</function>.
<simplelist>
<member><function>bcompiler_write_footer</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file