ispconfig wrapper
1.0.0
ISPCONFIG3リモートAPIのシンプルなラッパー。
ISPCONFIG 3と相互運用するように設計されたこの目的では、APIが提供するすべてのアクションを実行するための表現型でありながらシンプルなインターフェイスを提供することを目的としています。
ライブラリは、ISPCONFIG 3 SOAPサーバーとアプリの間のプロキシとして機能します。すべての関数は、より表現力豊かな(iMHO)ラクメルケース構文に変更されます。検証は行われず、関連するSOAPコールへのすべてのリクエストをプロキシングするだけです。唯一の変更は、すべての応答が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で新しい問題を作成することを躊躇しないでください。