bcompiler_write_class -- Writes an defined class as bytecodes
Description
Warning |
This function is
EXPERIMENTAL. That means, that the behaviour of this
function, the function name, in concreto ANYTHING documented here can
change in a future release of this package WITHOUT NOTICE. Be warned, and
use this function at your own risk. |
This reads the bytecodes from PHP for an existing class, and writes them to the
open file handle, It does not perform dependancy checking, so make sure you
write the classes in an order that will not result in an 'undefined class'
occuring when you load it.
Example 1. bcompiler_write_class() example <?php
$fh = fopen("/tmp/example","w");
bcompiler_write_header($fh);
bcompiler_write_class($fh,"DB");
// you must write DB_common before DB_mysql, as DB_mysql extends DB_common.
bcompiler_write_class($fh,"DB_common");
bcompiler_write_class($fh,"DB_mysql");
bcompiler_write_footer($fh);
fclose($fh);
?> |
|
See also: bcompiler_write_header(), bcompiler_write_footer().