Zend::loadInterface()
和Zend::loadClass()的用法是一样的,区别在于loadInterface()是用来加载接口。Zend::loadClass() 不能用来加载接口,因为PHP函数class_exists()
无法检查接口是否存在(PHP 5.0.2之前版本),所以需要用Zend::loadInterface()来代替。
<?php Zend::loadInterface($interface, $dirs) ?>
同样,如果你没有指定目录,但是文件中含有下划线_,Zend::loadInterface()也会自动到相应目录去寻找文件,这和Zend::loadClass()是一样的。