Yii的autoload 问题

今天在使用一个第三方类时遇到问题,里面使用了反射的方法来调用parent和self的方法,结果最后在跑到yii的autoload处 报找不到parent.php和self.php …

只好改写了Yii.php 马甲,复写了autoload部分,不知道是否有更好的方法…

class Yii extends YiiBase

{

public static function autoload($className)


{


	if($className=='self' || $className=='parent') return true;


	return parent::autoload($className);


}





public static function registerAutoloader($callback)


{


	spl_autoload_unregister(array('Yii','autoload'));


	spl_autoload_register($callback);


	spl_autoload_register(array('Yii','autoload'));


}

}

spl_autoload_unregister(array(‘YiiBase’,‘autoload’));

spl_autoload_register(array(‘Yii’,‘autoload’));

反射是不能调用parent和self的吧,这样改写仍然会出错啊

改写后是完全可以正常使用的,就是经过Yii 的 autoload时当成一个类来加载了

想知道你是怎么通过反射调用parent和self的。。。。 -_-! 贴代码