You appear to be a bot. Output may be restricted
Description
Load the OIK_Autoload logicYou might think that the fact that you invoke oik_require_lib( "oik_autoload" ); would be enough to tell the autoload library that you'll be using autoloading for your classes. But I think it's better to implicitely invoke either oik_require_class() or oik_autoload() to instantiate the autoloading logic when you know that OO code will be used. Notice we use oik_require_file() to load a class file manually.
Usage
oik_autoload( $autoload_shared_library );
Parameters
- $autoload_shared_library
- ( bool ) optional – True if we want autoloading of shared library classes.
Returns
voidSource
File name: oik/libs/oik-autoload.phpLines:
1 to 16 of 16
function oik_autoload( $autoload_shared_library=false ) { if ( !class_exists( "OIK_Autoload" ) ) { oik_require_file( "class-oik-autoload.php", "oik-autoload" ); } if ( class_exists( "OIK_Autoload" ) ) { $oik_autoload = OIK_Autoload::instance(); $oik_autoload->set_autoload_shared_library( $autoload_shared_library ); $oik_autoload->query_autoload_classes(); } else { bw_trace2( "Class OIK_Autoload does not exist", null, false, BW_TRACE_ERROR ); // @TODO Find a better solution to handle this error. //gob(); die(); } return( $oik_autoload ); }View on GitHub View on Trac