PHP 클래스 ApiClient

파일 보기 프로젝트 열기: fubralimited/php-oara 1 사용 예제들

공개 메소드들

메소드 설명
factory ( string $protocol = PROTOCOL_DEFAULT, string $version = VERSION_DEFAULT ) : mixed Factory function returns a static instance of the ApiClient.

비공개 메소드들

메소드 설명
__construct ( ) : void Make the constructor private to prevent the class being instantiated directly.
getInterface ( string $version, string $protocol ) : mixed Automatically includes the required ApiClient protocol class.

메소드 상세

factory() 공개 정적인 메소드

You can choose between three different api protocols. JSON, XML and SOAP are supported by the zanox api. If no version is given the latest version is always used. --- Usage example: creating api instance use soap api interface and the latest version $api = ApiClient::factory(PROTOCOL_SOAP, VERSION_DEFAULT); use xml api interface and the latest vesion $api = ApiClient::factory(PROTOCOL_XML, VERSION_DEFAULT); use json api interface and latest version $api = ApiClient::factory(PROTOCOL_JSON); ---
public static factory ( string $protocol = PROTOCOL_DEFAULT, string $version = VERSION_DEFAULT ) : mixed
$protocol string api protocol type (XML,JSON or SOAP)
$version string api version is optional
리턴 mixed object on successful instantiation or false