I am using SDK from http://devbay.net/sdk/guides/api/namespace-DTS.eBaySDK.html
And I need use Finding and Trading services in one file.
How can i declare different namespaces
use DTSeBaySDKConstants;
use DTSeBaySDKFindingServices;
use DTSeBaySDKFindingTypes;
use DTSeBaySDKFindingEnums;
use DTSeBaySDKTradingServices;
use DTSeBaySDKTradingTypes;
use DTSeBaySDKTradingEnums;
PHP Fatal error: Cannot use DTSeBaySDKTradingServices as Services because the name is already in use
So is any other way to do this ?
2
Answers
Namespace2{
//your logic
}
You can use aliases:
Though to avoid confusion with these newly introduced names, you could fall back to import only
DTSeBaySDKFinding
andDTSeBaySDKTrading
and explicitly use the types there like this: