Howdy guys,
Ive just committed changes to the SVN repository that changes all the
extensions on the PHP files from .php5 and .php3 to .php. Although this
may seem like a drastic step to make, as you lose all logging for the
files previously (the old files are still on the SVN logs btw..), it was
necessary to do this to get the __autoload() function working correctly.
This function is inbuilt to PHP5.x and helps you include class files
that you have referenced automatically, thus cutting down on code. The
function basically is called every time a class is loaded, this then use
the classes name to search for a .php file of the same name.
function __autoload($class_name) {
if($class_name != 'Log_null')
{
require_once("$class_name.php");
}
}
There is the code. From there I'm sure you can see why I needed to have
a unified extension throughout the package. The function is located with
the OpenDocumentFactory.php file and will stay there as its the
top-level object at present.
Well, I hope to explains it to everyone. Alex.
PS. If anyone knows where the class Log_null is being called from it
would be nice to fix it, because without the if() statement it produces
a nice Fatal Error because it cant find the file.
|