Then when I call a class, which is supposed to be loaded by a custom autoloader it works fine, but Yii autoloader still shows PHP error ‘…failed to open stream: No such file or directory…’
OK, seems I’m writing to myself, but if anybody would have a common problem, here’s where that issue is coming from.
YiiBase::createComponent calls Yii::import with forceInclude set to true,
then Yii::import does this:
if(($pos=strrpos($alias,'.'))===false) // a simple class name
{
if($forceInclude && self::autoload($alias))
self::$_imports[$alias]=$alias;
return $alias;
}
So this is not going through a normal autoloading process, it calls self::autoload directly.
I’m now looking into extending YiiBase and rewriting import function.