1 回答
TA贡献1780条经验 获得超1个赞
实际发现了问题。在 MyRepository 类中,注释和 TypeHint 存在问题:
namespace VendorName\MyExt\Domain\Repository;
use VendorName\MyExt\Service\ContainerService;
class MyRepository extends Repository
{
/**
*** @var \VendorName\MyExt\Service\ContainerService**
*/
public $containerService;
/**
* inject the ContainerService
*
* @param \VendorName\MyExt\Service\ContainerService $containerService
* @return void
*/
public function injectContainerService(\VendorName\MyExt\Service\ContainerService $containerService) {
$this->containerService = $containerService;
}
// Use Objects from The ContainerService
public function findAddress($addressId) {
$url = 'Person/getAddressbyId/'
$someData = $this->containerService->getRestClient()->sendRequest($url)
return $someData;
}
现在它起作用了。
- 1 回答
- 0 关注
- 87 浏览
添加回答
举报