Skip to content

Commit

Permalink
Remove ext-soap dependency, use custom SoapFault exception
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardist committed May 19, 2017
1 parent 8113db0 commit eb0b624
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 6 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}
],
"require": {
"ext-soap": "*",
"psr/log": "*"
},
"require-dev": {
Expand Down
1 change: 0 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use SimpleXMLElement;
use SoapFault;
use stdClass;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use AlexaCRM\CRMToolkit\Entity\MetadataCollection;
use AlexaCRM\CRMToolkit\Entity\EntityReference;
use Exception;
use SoapFault;

/**
* This class used for work with Dynamics CRM entities
Expand Down
2 changes: 1 addition & 1 deletion src/InvalidSecurityException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace AlexaCRM\CRMToolkit;

class InvalidSecurityException extends \SoapFault {
class InvalidSecurityException extends SoapFault {

}
2 changes: 1 addition & 1 deletion src/NotAuthorizedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace AlexaCRM\CRMToolkit;

class NotAuthorizedException extends \SoapFault {
class NotAuthorizedException extends SoapFault {

}
2 changes: 1 addition & 1 deletion src/OrganizationDisabledException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

namespace AlexaCRM\CRMToolkit;

class OrganizationDisabledException extends \SoapFault {
class OrganizationDisabledException extends SoapFault {

}
31 changes: 31 additions & 0 deletions src/SoapFault.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace AlexaCRM\CRMToolkit;

/**
* Represents a SOAP fault.
*/
class SoapFault extends \Exception {

public $faultcode;

public $faultstring;

public $faultactor;

public $detail;

public $faultname;

public $headerfault;

public function __construct($faultcode, $faultstring, $faultactor = null, $detail = null, $faultname = null, $headerfault = null) {
$this->faultcode = $faultcode;
$this->faultstring = $faultstring;
$this->faultactor = $faultactor;
$this->detail = $detail;
$this->faultname = $faultname;
$this->headerfault = $headerfault;
}

}

0 comments on commit eb0b624

Please sign in to comment.