See discussion here:
This autoloader only autoloads namespaces and classes that have been registered with it explicitly, and gives control back to the normal Yii autoloader otherwise.
To register namespaces, use Yii::getAutoloader()->addNamespace('foo\bar', '/path/to/foo/bar')
and/or Yii::getAutoloader()->addClass('foo\bar\Baz', '/path/to/foo/bar/Baz.php')
.
Overlapping namespace registrations are permitted - the most specific path will be preferred. That is, when you autoload foo\bar\Baz
, the path of the foo\bar
namespace will be preferred, even if a path for foo
is also registered. This enables you to e.g. override vendor-libraries that ship packaged with other vendor-libraries.