【发布时间】:2014-07-10 12:26:40
【问题描述】:
我正在关注 this tutorial 和 this one 以使用 Apigility 创建一个基本的 REST API,我不是 Zend 专家,因为我的目标是在 symfony2 应用程序上构建 api,但现在,毕竟关注两个教程中的步骤,我都达到了相同的点,当访问 http://api.example.com/endpoint1 时,我得到一个异常:
Zend\ServiceManager\Exception\ServiceNotCreatedException
File:
/var/www/api.example.com/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:1070
Message:
An abstract factory could not create an instance of exampleapiv1restprovinciacontroller(alias: ExampleAPI\V1\Rest\Provincia\Controller).
【问题讨论】:
-
ExampleAPI\V1\Rest\Provincia\Controller\中应该有一个控制器和一个工厂类。请张贴。
-
如果我在这个目录中只有 4 个文件怎么办?集合、实体、资源和资源工厂?没有任何控制器。
标签: php zend-framework zend-framework2 laminas-api-tools