コード例 #1
0
ファイル: ShipmentTracking.php プロジェクト: JiaoMing/dhl-1
 /**
  * Constructor
  *
  * @param Credentials $credentials - (Dependency injection) If not provided, a Credentials instance will be constructed.
  */
 public function __construct(Credentials $credentials = null)
 {
     if (null === $credentials) {
         // Create the Credentials
         $credentials = Credentials::getInstance();
     }
     $this->_credentials = $credentials;
 }
コード例 #2
0
 /**
  * Constructor
  *
  * @param Credentials $credentials - (Dependency injection) If not provided, a Credentials instance will be constructed.
  */
 public function __construct(Credentials $credentials = null)
 {
     if (null === $credentials) {
         // Create the Credentials
         $credentials = Credentials::getInstance();
     }
     $this->_credentials = $credentials;
     $this->_requestBuilder = new RequestBuilder($credentials);
 }