コード例 #1
0
ファイル: Cpanelapi.php プロジェクト: shirone/publicapi-php
 /**
  * Constructor
  * 
  * Prepare the adapter for use by Service.
  * 
  * If $RFT is not passed the const Cpanel_Service_Adapter_Cpanelapi::DRFT will be
  * used when invoking {@link setAdapterResponseFormatType()} at 
  * instantiation
  * 
  * HTTP port is set to '2083' by default.  {@link setPort()}
  * 
  * NOTE: this constructor as support for the legacy PHP XML-API client class
  * 
  * @param string $host     Host address for query call
  * @param string $user     User to authenticate query call
  * @param string $password Password to authenticate query call
  * @param string $RFT      Response format type
  * 
  * @return Cpanel_Service_Adapter_Cpanelapi
  */
 public function __construct($host = null, $user = null, $password = null, $RFT = null)
 {
     parent::__construct();
     if ($host) {
         $this->host = $host;
     }
     if ($user) {
         $this->user = $user;
     }
     if ($password) {
         $this->setPassword($password);
     }
     $this->setPort('2083');
     $RFT = $RFT ? $RFT : self::DRFT;
     $this->setAdapterResponseFormatType($RFT);
     return $this;
 }