I have created Custom Api which returns associativeArray
.
- If I use
associativeArray
it's giving error If I use
string[]
it's workingBut I want to return
associativeArray
.
Error: Class "array" does not exist. Please note that namespace must be specified
Example Methods:
/**
* Create multi Customers
*
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
* @return string[]
*/
public function save(\Magento\Customer\Api\Data\CustomerInterface $customer);
save
method working fine.
/**
* Create multi Customers
*
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
* @return array()|associativeArray()
*/
public function save1(\Magento\Customer\Api\Data\CustomerInterface $customer);
save1
method returning error.
Error: Class "array()" does not exist. Please note that namespace must be specified
So how can I return associativeArray
?
Thanks in advance.