我正在关注https://apigility.org/documentation/content-validation/basic-usage上的教程。但是,当我尝试在 ContactResource 中注入输入过滤服务 AddressBook\V1\Rest\Contact\Validator 时,出现以下错误:
Zend\ServiceManager\Exception\ServiceNotFoundException
File:
/Users/.../src/apigility-tutorials/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:529
Message:
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for AddressBook\V1\Rest\Contact\Validator
我不确定这是否是apigility本身的问题,这就是为什么我问上面链接中显示的示例在使用依赖注入时是否真的有效。谢谢