How to call Magento Api method in another api class?
I created one module in Magento. I create Api.开发者_运维问答php
in that. Now I want to call one another api method in that. For example in my module I have 2 folder. Product and Shipping. Now I create one method in mymodule/Shipping/Model/Api.php
and that i want to use in mymodule/Product/Model/Api.php
. So how can I import that api class in my product api.
$myShippingModel = Mage::getSingleton('shipping/api'); // The name here is based on mymodule/Shipping/etc/config.xml; alternatively you can call a model like so:
$myShippingModel = Mage::getSingleton('Mymodule_Shipping_Model_Api');
$myShippingModel->shippingApiMethodCall();
精彩评论