開発中の wordpress プラグインで spl_autoload_register を介してクラスの動的読み込みを使用したいのですが、問題は、この機能の既存の実装に干渉できないことです。私の最初の試みでは:
// register an autoloader function for template classes
spl_autoload_register ( 'template_autoloader' );
function template_autoloader ( $class ) {
include LG_FE_DIR . "/includes/chart_templates/class.{$class}.php";
}
自分のクラスをロードする際に機能しているように見えますが、同時に spl_autoload_register 機能も使用していると思われる他のプラグインから大量のエラーが発生します。
何か案は?