ispconfig wrapper
1.0.0
ISPConfig3 원격 API를위한 간단한 래퍼.
ISPConfig 3과 상호 작용하도록 설계된이 제품은 API가 제공하는 모든 작업을 수행 할 수있는 표현적이고 간단한 인터페이스를 제공하는 것을 목표로합니다.
라이브러리는 ISPConfig 3 SOAP 서버와 앱 사이의 프록시 역할을합니다. 모든 기능은보다 표현력있는 (IMHO) Camelcase 구문으로 이름이 바뀝니다. 유효성 검사를 수행 하지 않고 관련 비누 호출에 모든 요청을 프록시합니다. 유일한 변경 사항은 모든 응답이 JSON 인코딩 어레이로 반환된다는 것입니다.
errors 로 싸여 있습니다.result 으로 포장됩니다.$ composer require pemedina/ispconfig-wrapper 1. * 래퍼는 모든 PHP 응용 프로그램에 포함 및 사용할 수 있습니다.
<?php
$ webService = new ISPConfigWS (
new SoapClient ( NULL ,
array ( ' location ' => ' http://192.168.0.55/remote/index.php ' ,
' uri ' => ' http://192.168.0.55/remote/ ' ,
' exceptions ' => 0 )
)
);
// Login
$ webService
-> with ( array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' ))
-> login ();
$ result = $ webService
-> with ( array ( ' client_id ' => 5 ))
-> getClient ()
-> response ();
print_r json_decode ( $ result ));
// Single call
$ result = $ webService
-> with ( array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' , ' password ' => ' newPass ' , ' client_id ' => 5 ))
-> changeClientPassword ()
-> response ();
print_r json_decode ( $ result )); <?php
$ webService = new ISPConfigWS (
new SoapClient ( NULL ,
array ( ' location ' => ' http://192.168.0.55/remote/index.php ' ,
' uri ' => ' http://192.168.0.55/remote/ ' ,
' exceptions ' => 0 )
)
);
$ loginDetails = array ( ' loginUser ' => ' admin ' , ' loginPass ' => ' password ' );
$ webService -> setParameters ( $ loginDetails );
$ webService -> login ();
. . .
. . .
$ parameters = array ( ' client_id ' => 5 );
$ webService -> setParameters ( $ parameters );
$ webService -> getClient ();
print_r json_decode ( $ webService -> getResponse () ));버그를 찾았거나 기능이 누락 되었습니까? Github에서 새로운 문제를 만들어 주저하지 마십시오.