1 回答

TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超1個(gè)贊
實(shí)際發(fā)現(xiàn)了問(wèn)題。在 MyRepository 類(lèi)中,注釋和 TypeHint 存在問(wèn)題:
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;
}
現(xiàn)在它起作用了。
- 1 回答
- 0 關(guān)注
- 105 瀏覽
添加回答
舉報(bào)