From 8a2f683d8d7eb7ebc47cf9657ce38cc5b98a538f Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 17 Feb 2007 18:45:21 +0000 Subject: [PATCH] ref.bcompiler: switch to new doc style git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@230090 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/bcompiler-load-exe.xml | 42 ++++++++-- .../bcompiler/functions/bcompiler-load.xml | 59 +++++++++++--- .../functions/bcompiler-parse-class.xml | 62 +++++++++++--- .../bcompiler/functions/bcompiler-read.xml | 59 +++++++++++--- .../functions/bcompiler-write-class.xml | 80 ++++++++++++++++--- .../functions/bcompiler-write-constant.xml | 64 ++++++++++++--- .../functions/bcompiler-write-exe-footer.xml | 74 ++++++++++++++--- .../functions/bcompiler-write-file.xml | 59 ++++++++++++-- .../functions/bcompiler-write-footer.xml | 51 ++++++++++-- .../functions/bcompiler-write-function.xml | 68 +++++++++++++--- .../bcompiler-write-functions-from-file.xml | 66 ++++++++++++--- .../functions/bcompiler-write-header.xml | 64 ++++++++++++--- 12 files changed, 630 insertions(+), 118 deletions(-) diff --git a/reference/bcompiler/functions/bcompiler-load-exe.xml b/reference/bcompiler/functions/bcompiler-load-exe.xml index 13bdea81f8..1466df1182 100644 --- a/reference/bcompiler/functions/bcompiler-load-exe.xml +++ b/reference/bcompiler/functions/bcompiler-load-exe.xml @@ -1,21 +1,47 @@ - - + bcompiler_load_exe Reads and creates classes from a bcompiler exe file - - Description + + + &reftitle.description; boolbcompiler_load_exe stringfilename - &warn.experimental.func; Reads data from a bcompiler exe file and creates classes from the bytecodes. + + + + &reftitle.parameters; + + + + filename + + + The exe file path, as a string. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_load</function> example @@ -32,6 +58,12 @@ print_r(get_defined_classes()); + + + &reftitle.notes; + &warn.experimental.func; + + - + bcompiler_load Reads and creates classes from a bz compressed file - - Description + + + &reftitle.description; boolbcompiler_load stringfilename - &warn.experimental.func; - - - Please use include or require statements to parse bytecodes, it's more - portable and convenient way than using this function. - - 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. + + + + &reftitle.parameters; + + + + filename + + + The bzcompressed file path, as a string. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_load</function> example @@ -40,6 +59,22 @@ print_r(get_defined_classes()); + + + &reftitle.notes; + &warn.experimental.func; + + + Please use include or require statements to parse bytecodes, it's more + portable and convenient way than using this function. + + + Please note that this function won't execute script body code contained + in the bytecode file. + + + + - + bcompiler_parse_class Reads the bytecodes of a class and calls back to a user function - - Description + + + &reftitle.description; boolbcompiler_parse_class stringclass stringcallback - - - This function has been removed from bcompiler and is no - longer available as of bcompiler 0.5. - - Reads the bytecodes of a class and calls back to a user function. + + + + &reftitle.parameters; + + + + class + + + The class name, as a string. + + + + + callback + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_parse_class</function> example @@ -30,7 +58,7 @@ + + + &reftitle.notes; + &warn.experimental.func; + + + This function has been removed from bcompiler and is no longer available + as of bcompiler 0.5. + + + + - + bcompiler_read Reads and creates classes from a filehandle - - Description + + + &reftitle.description; boolbcompiler_read resourcefilehandle - &warn.experimental.func; - - - Please use include or require statements to parse - bytecodes, it's more portable and convenient way than using this function. - - 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. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_read</function> example @@ -40,6 +59,22 @@ print_r(get_defined_classes()); + + + &reftitle.notes; + &warn.experimental.func; + + + Please use include or require statements to parse bytecodes, it's more + portable and convenient way than using this function. + + + Please note that this function won't execute script body code contained + in the bytecode file. + + + + - + bcompiler_write_class Writes an defined class as bytecodes - - Description + + + &reftitle.description; boolbcompiler_write_class resourcefilehandle stringclassName stringextends - &warn.experimental.func; - 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. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + className + + + The class name, as a string. + + + + + extends + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_class</function> example @@ -41,11 +80,30 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + This function does not perform dependency checking, so make sure you + write the classes in an order that will not result in an + undefined class error occurring when you load it. + + + + + + &reftitle.seealso; - See also bcompiler_write_header, - and bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_footer + + - + bcompiler_write_constant Writes a defined constant as bytecodes - - Description + + + &reftitle.description; boolbcompiler_write_constant resourcefilehandle stringconstantName - &warn.experimental.func; - 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. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + constantName + + + The name of the defined constant, as a string. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_constant</function> example @@ -37,11 +71,23 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, - and bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_footer + + - + bcompiler_write_exe_footer Writes the start pos, and sig to the end of a exe type file - - Description + + + &reftitle.description; boolbcompiler_write_exe_footer resourcefilehandle intstartpos - &warn.experimental.func; - - An EXE (or self executable) file consists of 3 parts, - + An EXE (or self executable) file consists of 3 parts: The stub (executable code, e.g. a compiled C program) that loads PHP @@ -27,33 +24,72 @@ The Bytecodes (uncompressed only for the moment) The bcompiler EXE footer - The startpos is the file position at - which the Bytecodes start, and can be obtained using ftell($fh). To obtain a suitable stub you can compile php_embed-based stub phpe.c located in the examples/embed directory on bcompiler's CVS. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + startpos + + + The file position at which the Bytecodes start, and can be obtained + using ftell. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_footer</function> example @@ -61,12 +97,24 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, - bcompiler_write_class, and - bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_class + bcompiler_write_footer + + + bcompiler_write_file Writes a php source file as bytecodes - - Description + + + &reftitle.description; boolbcompiler_write_file resourcefilehandle stringfilename - &warn.experimental.func; This function complies specified source file into bytecodes, and writes them to the open file handle. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + filename + + + The source file path, as a string. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_file</function> example @@ -38,11 +73,23 @@ include "example.phb"; + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, and - bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_footer + + - + bcompiler_write_footer Writes the single character \x00 to indicate End of compiled data - - Description + + + &reftitle.description; boolbcompiler_write_footer resourcefilehandle - &warn.experimental.func; Writes the single character \x00 to indicate End of compiled data. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_footer</function> example @@ -34,11 +60,22 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, and - bcompiler_write_header. + + bcompiler_write_header + + - + bcompiler_write_function Writes an defined function as bytecodes - - Description + + + &reftitle.description; boolbcompiler_write_function resourcefilehandle stringfunctionName - &warn.experimental.func; - 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). + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + functionName + + + The function name, as a string. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_function</function> example @@ -38,11 +72,23 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, and - bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_footer + + - + bcompiler_write_functions_from_file Writes all functions defined in a file as bytecodes - - Description + + + &reftitle.description; boolbcompiler_write_functions_from_file resourcefilehandle stringfileName - &warn.experimental.func; - 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. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + fileName + + + The file to be compiled. + You must always include or require the file you intend to compile. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_functions_from_file</function> example @@ -38,11 +72,23 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_header, and - bcompiler_write_footer. + + bcompiler_write_header + bcompiler_write_footer + + - + bcompiler_write_header Writes the bcompiler header - - Description + + + &reftitle.description; boolbcompiler_write_header resourcefilehandle stringwrite_ver - &warn.experimental.func; 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. + + + + &reftitle.parameters; + + + + filehandle + + + A file handle as returned by fopen. + + + + + write_ver + + + Can be used to write bytecode in a previously used format, so that you + can use it with older versions of bcompiler. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>bcompiler_write_header</function> example @@ -36,13 +69,22 @@ fclose($fh); + + + + &reftitle.notes; + &warn.experimental.func; + + + + &reftitle.seealso; - See also bcompiler_write_file, - bcompiler_write_class, - bcompiler_write_function, and - bcompiler_write_footer. + + bcompiler_write_footer + +